Submission #1174053

#TimeUsernameProblemLanguageResultExecution timeMemory
1174053_ncng.nyrNile (IOI24_nile)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); long long ra(long long l, long long r) { return l + rng() % (r - l + 1); } int main() { for(int test = 1; test <= 1000; test++) { cerr << "Test Case #" << test << ":\n"; ofstream inp("task.inp"); int n = ra(3, 4); inp << n << "\n"; int lim = 20; for(int i = 1; i <= n; i ++) { int A = ra(2, 10); inp << ra(1, lim) << " " << A << " " << ra(1, A - 1) << "\n"; } int q = 10; inp << q << "\n"; while(q--) { inp << ra(1, lim) << " "; } inp.close(); system ("code.exe"); system ("codew.exe"); if (system ("fc task.out task.ans")) exit(0); } }

Compilation message (stderr)

nile.cpp: In function 'int main()':
nile.cpp:34:12: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   34 |     system ("code.exe");
      |     ~~~~~~~^~~~~~~~~~~~
nile.cpp:35:12: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   35 |     system ("codew.exe");
      |     ~~~~~~~^~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccM22MVD.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccxP7mDv.o:nile.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccM22MVD.o: in function `main':
grader.cpp:(.text.startup+0x30e): undefined reference to `calculate_costs(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status