Submission #52100

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
521002018-06-23 22:31:14spencercomptonGondola (IOI14_gondola)C++17
100 / 100
104 ms9800 KiB
#include <bits/stdc++.h>
#include "gondola.h"
using namespace std;
typedef long long ll;
ll mod = 1000000009LL;
ll expo(ll base, ll ex){
if(ex==0LL){
return 1LL;
}
if(ex==1LL){
return base;
}
if(ex%2LL==0LL){
ll now = expo(base,ex/2LL);
now *= now;
now %= mod;
return now;
}
else{
ll now = expo(base,ex-1LL) * base;
now %= mod;
return now;
}
}
int valid(int n, int inputSeq[])
{
set<int> ss;
for(int i = 0; i<n; i++){
ss.insert(inputSeq[i]);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

gondola.cpp: In function 'int valid(int, int*)':
gondola.cpp:31:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(ss.size()!=n){
     ~~~~~~~~~^~~
gondola.cpp:46:6: warning: unused variable 'pos' [-Wunused-variable]
  int pos = first.second;
      ^~~
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:121:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i<li.size(); i++){
                 ~^~~~~~~~~~
#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...