上一页 1 2 3 4 5 6 7 ··· 17 下一页
摘要: 如果是小写字母,需要转化为大写,然后判断bad里面有没有。 如果是大写字母,需要判断bad里面有没有以及上档键是不是坏了。 如果是其他,判断bad里面有没有。 #include <bits/stdc++.h> using namespace std; #define ll long long int 阅读全文
posted @ 2024-04-17 15:15 YuKiCheng 阅读(6) 评论(0) 推荐(0)
摘要: 直观:(25分) #include <bits/stdc++.h> using namespace std; #define ll long long vector<ll> vec; map<ll,int> mp;//元素-所在下标 int main(){ int n; ll p; cin>>n>> 阅读全文
posted @ 2024-04-17 11:00 YuKiCheng 阅读(7) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; int main(){ char s1[100],s2[100]; cin>>s1>>s2; //按照次序来 vector<char> vec; int j = 0; for(int i=0;i<strlen 阅读全文
posted @ 2024-04-17 10:09 YuKiCheng 阅读(6) 评论(0) 推荐(0)
摘要: 贴贴贴。 没技巧: #include <bits/stdc++.h> using namespace std; struct node { int year; int month; int day; string name; } s[100010]; bool cmp(node n1,node n2 阅读全文
posted @ 2024-04-16 21:37 YuKiCheng 阅读(6) 评论(0) 推荐(0)
摘要: 我看其他博客用的reverse,但是下标我真的有点糊涂,以下是参考某位dalao的。 #include <bits/stdc++.h> using namespace std; struct node { int sno; int data; int next; } s[100010]; int m 阅读全文
posted @ 2024-04-16 13:29 YuKiCheng 阅读(13) 评论(0) 推荐(0)
摘要: 字符串处理,费劲。 #include <bits/stdc++.h> using namespace std; int main() { string s; cin>>s; //找到E的位置 int index = s.find('E'); //分割开 string s1 = s.substr(1, 阅读全文
posted @ 2024-04-16 11:21 YuKiCheng 阅读(16) 评论(0) 推荐(0)
摘要: 呃,直接看代码吧。 #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)
上一页 1 2 3 4 5 6 7 ··· 17 下一页