摘要: A - Soft Drinking #include<bits/stdc++.h>using namespace std;int main() {int n,k,l,c,d,p,nl,np;cin>>n>>k>>l>>c>>d>>p>>nl>>np;int Yin=k*l/nl;int Ning=c 阅读全文
posted @ 2021-05-18 16:48 CHUNIN 阅读(49) 评论(0) 推荐(0)
摘要: 7-7 矩阵A乘以B (15分) 我写的代码: #include<bits/stdc++.h>using namespace std;#define N 1000#define ll long longint a[N][N];int b[N][N];int c[N][N];int main(){ i 阅读全文
posted @ 2020-11-22 21:27 CHUNIN 阅读(90) 评论(0) 推荐(0)
摘要: C - C CodeForces - 136C 我忘记了输入2时,输出一 错误代码 #include<bits/stdc++.h>using namespace std;#define ll long longconst int N=1e6+7;ll a[N];int main(){int n;ci 阅读全文
posted @ 2020-11-15 22:04 CHUNIN 阅读(46) 评论(0) 推荐(0)
摘要: 7-3 大笨钟 (10分) #include<bits/stdc++.h>using namespace std;#define ll long long#define N 100000int a[N];int main(){int hour,minue;scanf("%0d:%0d",&hour, 阅读全文
posted @ 2020-11-08 21:27 CHUNIN 阅读(84) 评论(0) 推荐(0)
摘要: D - D CodeForces - 758A 找每个与最大的差值即可 #include<bits/stdc++.h> using namespace std;#define ll long longconst int N=1e4+7;int a[N];int main(){int n;cin>>n 阅读全文
posted @ 2020-11-01 21:57 CHUNIN 阅读(43) 评论(0) 推荐(0)
摘要: 7-1 判断素数 (10分) 注意:特判一 #include<bits/stdc++.h>using namespace std;#define N 10000#define ll long longint prime(int n){ if(n==1)return 0; if(n==2||n==3) 阅读全文
posted @ 2020-10-25 20:52 CHUNIN 阅读(61) 评论(0) 推荐(0)
摘要: 7-3 N个数求和 (20分) 思路:一个个来,我当时忘了GCD是咋写的了,所以没写出来 #include<bits/stdc++.h>using namespace std;#define ll long longll gcd(ll a,ll b){if(b)while((a%=b)&&(b%=a 阅读全文
posted @ 2020-10-18 21:38 CHUNIN 阅读(60) 评论(0) 推荐(0)
摘要: C - From S To T 题意:三个字符串s t p,能否将p中的字符放入s中,使其成为t 思路:进行两次判断,1.s是t的字串,2.p中的字符可以补全s,使其成为t,而我最开始没有想到s是t的子串,失误了 #include<bits/stdc++.h>using namespace std; 阅读全文
posted @ 2020-10-11 21:40 CHUNIN 阅读(54) 评论(0) 推荐(0)
摘要: Stones in the Bucket 题意:就是将每个桶内的石块变得一样,可以为零,问你需要几次 思路:总和小于桶数的,直接扔掉,总和大于桶数的,求一下平均,统计一下比平均少的和多的,取其中数较小的,加上二者之差就是最终要的 #include<bits/stdc++.h> using names 阅读全文
posted @ 2020-10-04 13:17 CHUNIN 阅读(59) 评论(0) 推荐(0)
摘要: 补题: 3x3 Convolution #include<bits/stdc++.h>using namespace std;#define N 10000int a[N][N];int b[N][N];int main(){ios::sync_with_stdio(false);int t;cin 阅读全文
posted @ 2020-09-26 21:29 CHUNIN 阅读(112) 评论(0) 推荐(0)