Challenge 0 给一个长为 \(n\) 的数列,有 \(M\) 次操作 \((1\le n, m \le 10^5)\),每次操作是以下两种之一: 修改数列中的一个数 求数列中某位置的值 解答:数组模拟即可。 #include <iostream> #include <cstdio> #in ...
分类:
其他好文 时间:
2021-03-16 11:41:02
阅读次数:
0
ref #include <stdio.h> #include <stdlib.h> typedef struct node { int data; struct node *lchild, *rchild; }bitree_t; bitree_t *createNode(int data) { b ...
分类:
编程语言 时间:
2021-03-15 11:35:22
阅读次数:
0
#include <stdio.h>#include <stdlib.h>typedef struct node { int number; struct node * next;}person;person * initLink(int n) { int i = 0; person * head ...
分类:
其他好文 时间:
2021-03-15 11:31:33
阅读次数:
0
题意 如果两个数的数位和一样那么这两个数就是友好数,称数位和为友好ID,现在要找出给定的序列中有几个不同的友好ID 思路 按照要求模拟就好了 记录有几个不同的友好ID,可以采用set 代码 #include <iostream> #include <vector> #include <queue> ...
分类:
其他好文 时间:
2021-03-15 11:31:00
阅读次数:
0
1.实验任务11.行方向 #include<stdio.h> int main(){ printf(" o o\n"); printf("<H> <H>\n"); printf(" I I I I\n"); return 0; } 2.列方向 #include<stdio.h> int main() ...
分类:
编程语言 时间:
2021-03-15 11:30:29
阅读次数:
0
PAT 2021 春季 甲级 7-1 Arithmetic Progression of Primes ...
分类:
其他好文 时间:
2021-03-15 11:19:56
阅读次数:
0
处理了一年的边界问题 #include <bits/stdc++.h> using namespace std; const int N = 2e5 + 10; #define fi first #define se second #define sz(v) ((int)(v).size()) #d ...
分类:
其他好文 时间:
2021-03-15 11:18:36
阅读次数:
0
#include<stdio.h> int main(){ float x,y; float r1,r2,r3,r4; x=1; y=2; r1=x+y; r2=x-y; r3=x*y; r4=x/y; printf("r1=%f\n",r1); printf("r2=%f\n",r2); prin ...
分类:
其他好文 时间:
2021-03-15 11:15:58
阅读次数:
0
//打印一个字符小人 #include <stdio.h> int main() { printf(" o\n"); printf("<H>\n"); printf("I I\n"); printf(" o\n"); printf("<H>\n"); printf("I I\n"); return ...
分类:
编程语言 时间:
2021-03-15 11:13:42
阅读次数:
0
Tips:也可以尝试对deque,list进行类似的实验以加深理解。 #include <iostream> #include <vector> //#include <deque> using namespace std; int main() { vector <int> a; for(int ...
分类:
编程语言 时间:
2021-03-15 11:09:37
阅读次数:
0