Submission #588782

#TimeUsernameProblemLanguageResultExecution timeMemory
588782TekorBroken Device 2 (JOI22_device2)C++17
10 / 100
717 ms32448 KiB
#include "Anna.h" #include <utility> #include <vector> namespace { int variable_example = 0; } #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define ll long long int Declare() { variable_example++; return 2000; } std::pair<std::vector<int>, std::vector<int> > Anna(long long A) { vector <int> a,b; for(ll i = 1;i <= 2000;i++) { if(i * i >= A) { ll val = i * i - A; for(int j = 1;j <= min(val,i);j++)a.pb(1); for(int j = val + 1;j <= i;j++)a.pb(0); val = max(0ll,val - i); for(int j = 1;j <= min(val,i);j++)b.pb(1); for(int j = val + 1;j <= i;j++)b.pb(0); break; } } return mp(a,b); }
#include "Bruno.h" #include <utility> #include <vector> namespace { int variable_example = 0; } #include <bits/stdc++.h> using namespace std; #define ll long long long long Bruno(std::vector<int> u) { ll sz = u.size(); sz /= 2ll; ll k = sz * sz; ll cnt = 0; for(auto to : u) { cnt += to; } return k - cnt; }

Compilation message (stderr)

Bruno.cpp:7:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    7 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
#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...