Submission #290573

#TimeUsernameProblemLanguageResultExecution timeMemory
290573Pichon5Split the Attractions (IOI19_split)C++17
0 / 100
1 ms256 KiB
#include "split.h" #include <bits/stdc++.h> #define pb push_back using namespace std; vector<int> find_split(int n, int a, int b, int c, vector<int> p, vector<int> q) { vector<int> res; res.assign(n,2); map<int,int>m; for(int i=0;i<p.size();i++){ m[q[i]]++; m[p[i]]++; } map<int,int>:: iterator it; int aux=1; for(it=m.begin();it!=m.end();it++){ if(it->second==1){ res[it->first]=aux; aux+=2; } } return res; }

Compilation message (stderr)

split.cpp: In function 'std::vector<int> find_split(int, int, int, int, std::vector<int>, std::vector<int>)':
split.cpp:9:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |  for(int i=0;i<p.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...