-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71aba47
commit c23f506
Showing
5 changed files
with
63 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
1 | ||
2 3 1 2 14 | ||
1 2 4 | ||
1 2 1 | ||
2 1 5 | ||
9 10 1 6 15 | ||
5 7 39840 | ||
7 4 21005 | ||
3 7 68491 | ||
8 7 75121 | ||
3 5 51809 | ||
3 2 2392 | ||
1 4 90589 | ||
8 2 3372 | ||
8 1 29184 | ||
7 4 67316 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5 | ||
-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#include <bits/stdc++.h> //includes everything, supported in CF, usaco, not POJ | ||
#include "MyRandom.h" | ||
|
||
using namespace std; | ||
|
||
int main() | ||
{ | ||
const int FileCount = 10; //note:文件数量 | ||
ofstream fout; //note:文件流 | ||
random rdNum; //note:随机数 | ||
|
||
for (int fileId = 1; fileId <= FileCount; ++fileId) | ||
{ | ||
fout.open(to_string(fileId) + ".in"); | ||
|
||
//*************************** | ||
//在此处写入测试数据 | ||
//*************************** | ||
int T = rdNum.GetRand(1, 50); | ||
fout << T << "\n"; | ||
while (T--) | ||
{ | ||
int N=rdNum.GetRand(2, 10); | ||
int M=rdNum.GetRand(1, 30); | ||
int s=rdNum.GetRand(1, N); | ||
int t=rdNum.GetRand(1, N); | ||
int p=rdNum.GetRand(1, 50); | ||
fout << N << " " << M << " " << s << " " << t << " " << p << "\n"; | ||
while (M--) | ||
{ | ||
int u=rdNum.GetRand(1, N); | ||
int v=rdNum.GetRand(1, N); | ||
while (u==v) | ||
{ | ||
v=rdNum.GetRand(1, N); | ||
} | ||
int c=rdNum.GetRand(0, 100000); | ||
fout << u << " " << v << " " << c << "\n"; | ||
} | ||
|
||
} | ||
|
||
|
||
fout.close(); | ||
} | ||
|
||
return 0; | ||
} |