Submission #65186

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
651862018-08-07 00:57:59spencercomptonZalmoxis (BOI18_zalmoxis)C++14
100 / 100
544 ms83568 KiB
#include <bits/stdc++.h>
using namespace std;
int n, k;
void f(int now){
if(now==0 || k==0){
cout << " " << now;
return;
}
k--;
f(now-1);
f(now-1);
}
int main(){
cin >> n >> k;
vector<pair<int, int> > li;
for(int i = 0; i<n; i++){
int x;
cin >> x;
li.push_back(make_pair(i,x));
}
vector<pair<int, int> > cur;
cur = li;
vector<int> add[n];
int use = 0;
for(int i = 0; i<30; i++){
vector<pair<int, int> > nxt;
nxt.push_back(cur[0]);
for(int j = 1; j<cur.size(); j++){
int bef = nxt.back().second;
int now = cur[j].second;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

zalmoxis.cpp: In function 'int main()':
zalmoxis.cpp:28:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 1; j<cur.size(); j++){
                  ~^~~~~~~~~~~
zalmoxis.cpp:61:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0; j<add[i].size(); j++){
                  ~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...