本文分类:news发布日期:2026/3/3 15:15:41
相关文章
1081. Rational Sum (20)
1081. Rational Sum (20)#include <iostream>using namespace std;long long getsame(long long a, long long b)
{if(b != 0){return getsame(b, a % b);}else{return a;}
}void simplify(long long &a, lo…
建站知识
2026/1/14 9:45:24
1067. Sort with Swap(0) (25)
1067. Sort with Swap(0) (25)#include <iostream>using namespace std;int index[100010], num[100010];int main()
{int n;scanf("%d", &n);int i, count = 0;for(i = 0; i < n; i++){scanf(…
建站知识
2026/2/28 13:47:48
1066. Root of AVL Tree (25)
1066. Root of AVL Tree (25)#include <iostream>
#include <stdlib.h>using namespace std;typedef struct node
{int key, bf;struct node *lchild, *rchild;
}*bnode;void rrotate(bnode *root)
{bnode…
建站知识
2026/2/10 9:13:19
1070. Mooncake (25)
1070. Mooncake (25)#include <iostream>
#include <algorithm>using namespace std;struct node
{double amounts, prices, perprice;
}mooncakes[1010];int cmp(node n1, node n2)
{return n1.perprice …
建站知识
2026/2/21 0:22:10
1069. The Black Hole of Numbers (20)
1069. The Black Hole of Numbers (20)#include <iostream>
#include <string.h>
#include <algorithm>using namespace std;int cmp(char a, char b)
{return a > b;
}int main()
{int num[2];s…
建站知识
2026/3/3 9:05:49
1050. String Subtraction (20)
1050. String Subtraction (20)#include <iostream>
#include <string.h>using namespace std;int flag[130];
char s[2][10010];int main()
{int i, len[2];for(i = 0; i <= 1; i++){gets(s[i]);len[i…
建站知识
2026/2/20 5:45:55
1042. Shuffling Machine (20)
1042. Shuffling Machine (20)#include <iostream>using namespace std;int main()
{int k;scanf("%d", &k);int res[55], index[55], i;for(i = 1; i <= 54; i++){scanf("%d", &…
建站知识
2026/2/21 14:25:32
1049. Counting Ones (30)
1049. Counting Ones (30)#include <iostream>using namespace std;int main()
{int n;scanf("%d", &n);int low, mid, high, d = 1, res = 0;while(n >= d){high = n / (d * 10);mid = (n - h…
建站知识
2026/2/25 5:33:06

