Submission #1085902

#TimeUsernameProblemLanguageResultExecution timeMemory
1085902lmaobruhNadan (COCI18_nadan)C++14
50 / 50
1 ms460 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define fo(i, a, b) for (int i = (a); i <= (b); ++i) #define fd(i, a, b) for (int i = (a); i >= (b); --i) #define ii pair<int, int> #define fi first #define se second #define pb push_back #define all(x) x.begin(), x.end() const int N = 1e6+5; int32_t main() { cin.tie(0)->sync_with_stdio(0); if (fopen("A.inp", "r")) { freopen("A.inp", "r", stdin); // freopen("A.out", "w", stdout); } int n, k; cin >> k >> n; fo(i, 1, n-1) { cout << i << ' '; k -= i; } cout << k; }

Compilation message (stderr)

nadan.cpp: In function 'int32_t main()':
nadan.cpp:16:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |         freopen("A.inp", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...