Submission #316519

#TimeUsernameProblemLanguageResultExecution timeMemory
316519DymoKangaroo (CEOI16_kangaroo)C++14
0 / 100
1 ms512 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long //#define endl '\n' #define task "girth" const int N = 1e5 + 5; const int maxn=1e5+5; ll rd(ll l, ll r){ return ((rand() << 15) | rand()) % (r - l + 1) + l; } ll amrd(ll l, ll r){ ll x = rd(1, 2); if (x == 1) return -(((rand() << 15) | rand()) % (r - l + 1) + l); else return ((rand() << 15) | rand()) % (r - l + 1) + l; } int main(){ ios_base::sync_with_stdio(false); cin.tie(0); /* if (fopen("A.inp", "r")){ freopen("test.inp", "r", stdin); freopen("test.out", "w", stdout); }*/ srand(time(NULL)); for (int tc = 1; tc <= 100000; tc++){ ofstream inp("test.inp"); ll n=rd(1,1000); ll st=rd(1,n); ll ed=rd(1,n); inp <<n<<" "<<st<<" "<<ed<<endl; inp.close(); system("A.exe"); system("B.exe"); if (system("fc test.out test.ans") != 0){ cout << "Test " << tc << ": " << "wrong~!"; return 0; } cout << "Test " << tc << ": " << "Correct~!" << endl; } }

Compilation message (stderr)

kangaroo.cpp: In function 'int main()':
kangaroo.cpp:36:23: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Wunused-result]
   36 |                 system("A.exe");
      |                 ~~~~~~^~~~~~~~~
kangaroo.cpp:37:23: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Wunused-result]
   37 |                 system("B.exe");
      |                 ~~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...