-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_data.cpp
49 lines (39 loc) · 2.97 KB
/
gen_data.cpp
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
/***
* ██▓ ██▓███ ███▄ ▄███▓ ▓█████ ▒██ ██▒ ██▓███ ▓█████ ██▀███ ██▓ ███▄ ▄███▓▓█████ ███▄ █ ▄▄▄█████▓ ██████
* ▓██▒ ▓██░ ██▒▓██▒▀█▀ ██▒ ▓█ ▀ ▒▒ █ █ ▒░▓██░ ██▒▓█ ▀ ▓██ ▒ ██▒▓██▒▓██▒▀█▀ ██▒▓█ ▀ ██ ▀█ █ ▓ ██▒ ▓▒▒██ ▒
* ▒██░ ▓██░ ██▓▒▓██ ▓██░ ▒███ ░░ █ ░▓██░ ██▓▒▒███ ▓██ ░▄█ ▒▒██▒▓██ ▓██░▒███ ▓██ ▀█ ██▒▒ ▓██░ ▒░░ ▓██▄
* ▒██░ ▒██▄█▓▒ ▒▒██ ▒██ ▒▓█ ▄ ░ █ █ ▒ ▒██▄█▓▒ ▒▒▓█ ▄ ▒██▀▀█▄ ░██░▒██ ▒██ ▒▓█ ▄ ▓██▒ ▐▌██▒░ ▓██▓ ░ ▒ ██▒
* ░██████▒▒██▒ ░ ░▒██▒ ░██▒ ░▒████▒▒██▒ ▒██▒▒██▒ ░ ░░▒████▒░██▓ ▒██▒░██░▒██▒ ░██▒░▒████▒▒██░ ▓██░ ▒██▒ ░ ▒██████▒▒
* ░ ▒░▓ ░▒▓▒░ ░ ░░ ▒░ ░ ░ ░░ ▒░ ░▒▒ ░ ░▓ ░▒▓▒░ ░ ░░░ ▒░ ░░ ▒▓ ░▒▓░░▓ ░ ▒░ ░ ░░░ ▒░ ░░ ▒░ ▒ ▒ ▒ ░░ ▒ ▒▓▒ ▒ ░
* ░ ░ ▒ ░░▒ ░ ░ ░ ░ ░ ░ ░░░ ░▒ ░░▒ ░ ░ ░ ░ ░▒ ░ ▒░ ▒ ░░ ░ ░ ░ ░ ░░ ░░ ░ ▒░ ░ ░ ░▒ ░ ░
* ░ ░ ░░ ░ ░ ░ ░ ░ ░░ ░ ░░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░
* ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
*
*/
#include <cstdlib>
#include <cstdio>
#include <ctime>
using namespace std;
int main()
{
srand(time(NULL));
int N, M;
scanf("%d%d", &N, &M);
printf("%d %d\n", N, M);
FILE* fout = fopen("data_2d.dat", "w+");
fprintf(fout, "Varmap fft 2d\n");
fprintf(fout, "3\n");
fprintf(fout, "X\n");
fprintf(fout, "Y\n");
fprintf(fout, "data\n");
for (int i = 0; i < N; ++i) {
for (int j = 0; j < M; ++j) {
double v = rand() % 200;
printf("%lf ", v);
fprintf(fout, "%d %d %lf\n", i, j, v);
}
printf("\n");
}
fclose(fout);
return 0;
}