Submission #613763

#TimeUsernameProblemLanguageResultExecution timeMemory
613763Do_you_copyCOCI17_cezar (COCI17_cezar)C++17
50 / 50
1 ms332 KiB
#include <bits/stdc++.h> #define taskname "test" #define fi first #define se second #define pb push_back #define faster ios_base::sync_with_stdio(0); cin.tie(0); using namespace std; using ll = long long; using ull = unsigned ll; using ld = long double; using pii = pair <int, int>; using pil = pair <int, ll>; using pli = pair <ll, int>; using pll = pair <ll, ll>; mt19937 Rand(chrono::steady_clock::now().time_since_epoch().count()); ll min(const ll &a, const ll &b){ return (a < b) ? a : b; } ll max(const ll &a, const ll &b){ return (a > b) ? a : b; } //const ll Mod = 1000000007; //const ll Mod2 = 999999999989; //only use when required const int maxN = 1e5 + 1; int n; int a[12] = {0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 4}; void Init(){ cin >> n; ll sum = 0; for (int i = 1; i <= n; ++i){ int x; cin >> x; --a[x]; sum += x; } if (21 - sum >= 11) cout << "VUCI"; else{ ll f1 = 0, f2 = 0; for (int i = 0; i <= 11; ++i){ if (i > 21 - sum){ f1 += a[i]; } else f2 += a[i]; } if (f1 > f2) cout << "DOSTA"; else cout << "VUCI"; } } int main(){ if (fopen(taskname".inp", "r")){ freopen(taskname".inp", "r", stdin); //freopen(taskname".out", "w", stdout); } faster; ll tt = 1; //cin >> tt; while (tt--){ Init(); } }

Compilation message (stderr)

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