Submission #1101650

#TimeUsernameProblemLanguageResultExecution timeMemory
1101650vjudge1Bridž (COCI17_bridz)C++17
0 / 50
1 ms504 KiB
#include <bits/stdc++.h> #define task "TEST" #define task2 "A" #define pl pair<int, int> #define pf push_front #define pb push_back #define pob pop_back #define pof pop_front #define mp make_pair #define fi first #define se second #define FOR(i, a, b, c) for (int i=a; i<=b; i+=c) #define FORE(i, a, b, c) for (int i=a; i>=b; i+=c) using namespace std; using ll = long long; using ull = unsigned long long; const int Mod = 1e9+7; const int maxn = 1e3; const ll Inf = 1e18; string str; ll res; ll n, a, last; bool chk; void Read() { cin >> n; FOR(i, 1, n, 1) { cin >> a; FOR(i, last+1, a-1, 1) cout << i << '\n'; if (a > last + 1) chk = 1; last = a; } if (!chk) cout << "good job" << '\n'; } void Solve() { } int main() { if (fopen (task".inp", "r")) { freopen (task".inp", "r", stdin); freopen (task".out", "w", stdout); } ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; for (t=1; t--;) { Read(); Solve(); } }

Compilation message (stderr)

bridz.cpp: In function 'int main()':
bridz.cpp:40:17: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   40 |         freopen (task".inp", "r", stdin);
      |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
bridz.cpp:41:17: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   41 |         freopen (task".out", "w", stdout);
      |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...