Submission #840032

#TimeUsernameProblemLanguageResultExecution timeMemory
840032fanwenDžumbus (COCI19_dzumbus)C++17
0 / 110
2 ms912 KiB
#include <bits/stdc++.h> #define MASK(x) (1LL << (x)) #define BIT(x, k) (((x) >> (k)) & 1) #define ALL(x) (x).begin(),(x).end() #define REP(i, n) for (int i = 0, _n = n; i < _n; ++i) #define FOR(i, a, b) for (int i = (a), _b = (b); i <= _b; ++i) #define FORD(i, a, b) for (int i = (a), _b = (b); i >= _b; --i) #define FORE(it, s) for (__typeof(s.begin()) it = (s).begin(); it != (s).end(); ++it) #define TIME (1.0 * clock() / CLOCKS_PER_SEC) #define file(TASK) if(fopen(TASK".inp", "r")) { freopen(TASK".inp", "r", stdin); freopen(TASK".out", "w", stdout); } template <class U, class V> bool maximize(U &A, const V &B) { return (A < B) ? (A = B, true) : false; } template <class U, class V> bool minimize(U &A, const V &B) { return (A > B) ? (A = B, true) : false; } using namespace std; mt19937 jdg(chrono::steady_clock::now().time_since_epoch().count()); long long Rand(long long l, long long r) { return l + jdg() % (r - l + 1); } int a[21], n, k; bool checker() { } void MakeTest(void) { ofstream inp ("TASK.inp"); int n = Rand(5, 5); inp << n << " " << n - 1 << '\n'; FOR(i, 1, n) inp << Rand(1, 10) << " \n"[i == n]; FOR(i, 2, n) { inp << i << " " << Rand(1, i - 1) << '\n'; } int q = 3; inp << q << '\n'; FOR(i, 1, q) inp << Rand(1, 50) << '\n'; } signed main() { srand(time(nullptr)); int Test = 100; // MakeTest(); return 0; // system("TASK.exe"); // system("TASK_trau.exe"); // return 0; FOR(itest, 1, Test) { MakeTest(); system("TASK.exe"); system("TASK_trau.exe"); if(system("fc TASK.out TASK.ans") != 0) { cout << "Test " << itest << " : is wrong answer\n"; return 0; } cout << "Test " << itest << " : is accepted \n"; } // cerr << "Time elapsed: " << TIME << " s.\n"; return (0 ^ 0); }

Compilation message (stderr)

dzumbus.cpp: In function 'bool checker()':
dzumbus.cpp:24:1: warning: no return statement in function returning non-void [-Wreturn-type]
   24 | }
      | ^
dzumbus.cpp: In function 'int main()':
dzumbus.cpp:46:15: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   46 |         system("TASK.exe");
      |         ~~~~~~^~~~~~~~~~~~
dzumbus.cpp:47:15: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   47 |         system("TASK_trau.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...