上一页 1 2 3 4 5 6 ··· 17 下一页
摘要: 和力扣上一道题差不多,不过的当时没写出来,这次出来了。 注释写好了。 #include <bits/stdc++.h> using namespace std; const int inf = 0x3f3f3f3f; #define ll long long int arr[100010]; int 阅读全文
posted @ 2024-04-18 15:34 YuKiCheng 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 暴力(15分) #include <bits/stdc++.h> using namespace std; const int inf = 0x3f3f3f3f; #define ll long long double a[100010]; int main(){ int n; cin>>n; fo 阅读全文
posted @ 2024-04-18 14:53 YuKiCheng 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 暴力(12分) #include <bits/stdc++.h> using namespace std; const int inf = 0x3f3f3f3f; #define ll long long int a[100010]; int main(){ int n; cin>>n; for(i 阅读全文
posted @ 2024-04-18 12:37 YuKiCheng 阅读(26) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; const int inf = 0x3f3f3f3f; #define ll long long char a[110],b[110]; int cal[110],cal2[110]; char cal3[1 阅读全文
posted @ 2024-04-18 11:58 YuKiCheng 阅读(9) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> const int inf = 0x3f3f3f3f; #define ll long long using namespace std; int res1,res2; int main(){ int n; cin>>n; for(int i=0;i 阅读全文
posted @ 2024-04-18 11:01 YuKiCheng 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 最最严重的问题, 如果字符串只有一个的时候不一定就是个位,也可能是十位,这要取决于在哪个数组中出现。 还有如果是数字,比如13,那么十位是1,个位是0没问题吧,按照平时应该输出tam tret,但是这题的要求是只输出tam即可。 所以也要在代码里面特判。 我真的想吐槽C++字符串处理,java明明一 阅读全文
posted @ 2024-04-18 10:10 YuKiCheng 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 只要有一个珠子缺少,那么就是缺少珠子,我们需要将缺少的珠子(mp[x]<0的)加起来。 #include <bits/stdc++.h> using namespace std; char cs[1100],cs2[1100]; map<char,int> mp; int main(){ cin>> 阅读全文
posted @ 2024-04-17 20:35 YuKiCheng 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 把单位统一了做减法。 #include <bits/stdc++.h> using namespace std; int c1,c2,c3; int a1,a2,a3; int main(){ scanf("%d.%d.%d",&c1,&c2,&c3);//应该支付 scanf("%d.%d.%d" 阅读全文
posted @ 2024-04-17 20:06 YuKiCheng 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; int n; int a[110],c[110]; int main(){ cin>>n; for(int i=0;i<n;i++) cin>>a[i]; for(int i=0;i<n;i++) cin>> 阅读全文
posted @ 2024-04-17 18:52 YuKiCheng 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 没做出来,看dalao的,dalao超巨。 注意的点: 分子0的处理/计算公约数的时候取正不然会改变正负性 reduction为核心方法 #include <bits/stdc++.h> using namespace std; #define ll long long struct Fractio 阅读全文
posted @ 2024-04-17 17:04 YuKiCheng 阅读(7) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 17 下一页