摘要:
呃,直接看代码吧。 #include <bits/stdc++.h> using namespace std; int main() { int a[10]; int mc = -1; for(int i=0; i<10; i++) { int count; cin>>count; if(mc == 阅读全文
posted @ 2024-04-15 20:30
YuKiCheng
阅读(6)
评论(0)
推荐(0)
摘要:
给定的范围是2^30-1,如果是转化成2进制,也得30位,所以 不管用int或者long long都是没办法接收的(int大概是9位,long long是19位)只能用数组/栈了。 #include <bits/stdc++.h> using namespace std; #define ll lo 阅读全文
posted @ 2024-04-15 20:10
YuKiCheng
阅读(36)
评论(0)
推荐(0)
摘要:
第一次知道sprintf这个函数,孤陋寡闻了。 写法一, #include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; char cs[100]; sprintf(cs,"%04d",n); int a = 0,b= 阅读全文
posted @ 2024-04-15 18:41
YuKiCheng
阅读(12)
评论(0)
推荐(0)
摘要:
又臭又长。 #include <bits/stdc++.h> using namespace std; map<int,char> mp = {{1,'C'},{2,'J'},{3,'B'}}; int wa[10],wb[10],ping;//a通过各种手势赢得比赛的次数 假定依次是cjb int 阅读全文
posted @ 2024-04-15 17:21
YuKiCheng
阅读(7)
评论(0)
推荐(0)
摘要:
方法: 逐位试商法。 测试点2: 被除数小于除数 #include <bits/stdc++.h> using namespace std; int main(){ string s; int b; cin>>s>>b; int a[1010],c[1010]; for(int i=0;i<s.si 阅读全文
posted @ 2024-04-15 16:08
YuKiCheng
阅读(12)
评论(0)
推荐(0)
摘要:
又臭又长 #include <bits/stdc++.h> using namespace std; struct node { string sno; int df; int cf; } s[10010]; vector<node> a,b,c,d;//三个批 bool cmp(node x1,n 阅读全文
posted @ 2024-04-15 15:11
YuKiCheng
阅读(7)
评论(0)
推荐(0)