摘要: P2678虽然是黄题,但是只要想通思路,就会变得异常简单。 以下是思路《跳石头》算法思路详解.url 100分错1个点代码: 点击查看代码 #include<bits/stdc++.h> using namespace std; int L,N,M,d[50005]; bool check(int 阅读全文
posted @ 2025-11-23 16:06 烈空坐 阅读(0) 评论(0) 推荐(0)
摘要: P8661 主要知识点:结构体,sort倒排,自定义函数,循环结构 点击查看代码 #include<bits/stdc++.h> using namespace std; struct node{() int a,b; }a[100005]; int n,d,k; int cmp(node x,no 阅读全文
posted @ 2025-07-21 18:46 烈空坐 阅读(6) 评论(0) 推荐(0)
摘要: A 点击查看代码 #include <stdio.h> int n, ans; int main() { scanf("%d", &n); for (int i = 1, a, b; i <= n; i++) { scanf("%d %d", &a, &b); if (a < b) ans++; } 阅读全文
posted @ 2025-07-04 20:42 烈空坐 阅读(38) 评论(0) 推荐(0)
摘要: A 点击查看代码 #include <bits/stdc++.h> using namespace std; string s,t; int main(){ int n,i; cin>>n>>s>>t; for(i=0;i<n;i++) { if(s[i]=='o'&&t[i]=='o') { co 阅读全文
posted @ 2025-06-08 19:12 烈空坐 阅读(27) 评论(1) 推荐(0)
摘要: A 点击查看代码 #include <bits/stdc++.h> using namespace std; string s,t; int main(){ int n,i; cin>>n>>s>>t; for(i=0;i<n;i++) { if(s[i]=='o'&&t[i]=='o') { co 阅读全文
posted @ 2025-06-08 19:09 烈空坐 阅读(14) 评论(0) 推荐(0)
摘要: 有 N 个物品。给定长度为 N 的字符串 T 和 A ,分别表示高桥和青木想要的物品。设 T i ​ 和 A i ​ 为字符串 T 和 A 的第 i 个字符( 1≤i≤N )。 当 T i ​ 为 o 时,高桥想要第 i 个物品;为 x 时不想要。 当 A i ​ 为 o 时,青木想要第 i 个物品 阅读全文
posted @ 2025-06-08 18:33 烈空坐 阅读(20) 评论(0) 推荐(0)