Submission #512683

#TimeUsernameProblemLanguageResultExecution timeMemory
512683lovro_nidogon1Languages (IOI10_languages)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #define ll long long #include "lang.h" #include "grader.h" #define bretrun return using namespace std; ll freq[56][70001], nocur[56], spac, cfreq[70001]; ll sq(ll x, ll y) {breturn (x + y) * (x + y);} void excerpt(ll e[101]) { memset(cfreq, 0, sizeof(cfreq)); for(ll i = 0; i < 100; i++) cfreq[e[i]]++; ll exp = 0; ll sd = 1e9; for(ll i = 0; i < 56; i++) { ll csd = 0; for(ll j = 0; j < 65536; j++) { csd += sq(cfreq[j] * nocur[i], -freq[i][j]); } if(csd < sd) sd = csd, exp = i; } ll ca = language(exp); for(ll i = 0; i < 65536; i++) freq[ca][i] += cfreq[i]; nocur[ca]++; }

Compilation message (stderr)

lang.cpp: In function 'long long int sq(long long int, long long int)':
lang.cpp:8:20: error: 'breturn' was not declared in this scope; did you mean 'bretrun'?
    8 | ll sq(ll x, ll y) {breturn (x + y) * (x + y);}
      |                    ^~~~~~~
      |                    bretrun
lang.cpp:8:46: warning: no return statement in function returning non-void [-Wreturn-type]
    8 | ll sq(ll x, ll y) {breturn (x + y) * (x + y);}
      |                                              ^