-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaseGenerator.cpp
More file actions
37 lines (37 loc) · 740 Bytes
/
CaseGenerator.cpp
File metadata and controls
37 lines (37 loc) · 740 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
#include<stdio.h>
#include<iostream>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<algorithm>
#include<set>
#include<map>
#include<utility>
#include<vector>
#include<string>
#include<stack>
#include<queue>
using namespace std;
int main()
{
freopen("data.txt", "w", stdout);
srand(time(NULL));
int T = rand()%50 + 1;
int R,C,K,r,c,n;
printf("%d\n", T);
while(T--)
{
R = rand()%200 + 1, C = rand()%200 + 1; K = rand()%112500+1;
printf("%d %d %d\n", R,C,K);
for (r=1; r<=R; ++r)
{
for (c=1; c<=C; ++c)
{
n = rand()%20 + 1;
printf("%d ", n);
}
puts("");
}
}
return 0;
}