上一页 1 2 3 4 5 6 7 8 ··· 17 下一页
摘要: 方法: 逐位试商法。 测试点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)
摘要: 我感觉是这题出的有问题,第二个只说了字母,并没有说第二个大写字母...为啥就得从第一个大写字母后面开始检索呢。 #include <bits/stdc++.h> using namespace std; map<int,string> mp = {{1,"MON"},{2,"TUE"},{3,"WE 阅读全文
posted @ 2024-04-14 23:00 YuKiCheng 阅读(7) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; bool isPrime(int x){ if(x==1) return false; for(int i=2;i<=sqrt(x);i++){ if(x%i==0) return false; } retu 阅读全文
posted @ 2024-04-14 20:59 YuKiCheng 阅读(9) 评论(0) 推荐(0)
摘要: 测试点2应该是只输入1对并且是一个常数,如3 0这种。应该输出0 0。 #include <bits/stdc++.h> using namespace std; vector<int> a,b;//系数 指数 int main(){ int xs,zs; while(cin>>xs>>zs){ a 阅读全文
posted @ 2024-04-13 15:47 YuKiCheng 阅读(9) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; int main(){ string s; getline(cin,s); string str = ""; vector<string> vec; for(int i=0;i<s.size();i++){ 阅读全文
posted @ 2024-04-12 20:38 YuKiCheng 阅读(12) 评论(0) 推荐(0)
摘要: 代码有点长,但是我比较喜欢这种做法。 注意的点是如果第一个参与了反转,那么返回的就是区间反转之后的头结点,而不是原始头结点。 import java.util.*; /* * public class ListNode { * int val; * ListNode next = null; * p 阅读全文
posted @ 2024-04-12 12:46 YuKiCheng 阅读(15) 评论(0) 推荐(0)
摘要: 开始刷数据结构了。 1.递归 import java.util.*; /* * public class ListNode { * int val; * ListNode next = null; * public ListNode(int val) { * this.val = val; * } 阅读全文
posted @ 2024-04-12 11:52 YuKiCheng 阅读(8) 评论(0) 推荐(0)
摘要: dijkstra+判断。 #include <bits/stdc++.h> using namespace std; const int inf = 0x3f3f3f3f; int edges[210][210],visited[210]; int cnt[210],enemy[210],pre[2 阅读全文
posted @ 2024-04-10 19:51 YuKiCheng 阅读(19) 评论(0) 推荐(0)
摘要: 这题思路不难,但是真的真的不太好写。 #include <bits/stdc++.h> using namespace std; const int maxn = 10000; const int inf = 0x3f3f3f3f; vector<int> vec[maxn]; int line[m 阅读全文
posted @ 2024-04-10 19:47 YuKiCheng 阅读(27) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 17 下一页