-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDynamic Array_02.c
More file actions
75 lines (58 loc) · 806 Bytes
/
Copy pathDynamic Array_02.c
File metadata and controls
75 lines (58 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
Sample Input
2 5
1 0 5
1 1 7
1 0 3
2 1 0
2 1 1
Sample Output
7
3
*/
#include<stdio.h>
#define Max_N 100001
int N;
int Q;
long int x;
long int y;
int type;
int lastAns;
int **Seq;
void solveCase() {
int indx;
if (type == 1) {
indx = (x ^ lastAns) % N;
Append();
}
}
void readCase() {
int i, j;
lastAns = 0;
scanf("%d %d", &N, &Q);
for (i = 0; i < Q; i++) {
scanf("%d %d %d", &type, &x, &y);
solveCase();
}
}
void printCase() {
printf("-----------------------\n");
int i, j;
for (i = 0; i < N; i++) {
for (j = 0; j < N; j++) {
printf("%d", Seq[i][j]);
}
printf("\n");
}
}
int main() {
int i;
Seq = malloc(sizeof(int*) * Max_N);
for (i = 0; i < Max_N; i++) {
Seq[i] = malloc(sizeof(int*)*Max_N);
}
readCase();
solveCase();
//printCase();
return 0;
}