Submission #750524

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7505242023-05-29 15:41:27vjudge1Art Collections (BOI22_art)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;
int sz=0;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
//cout.tie(0);
int n,m;
cin>>n>>m;
vector<int>allind;
vector<pair<int,int>>all(n);
for(int i=0;i<n;i++){
cin>>all[i].first>>all[i].second;
allind.push_back(all[i].first);
allind.push_back(all[i].second);
}
sort(allind.begin(),allind.end());
allind.resize(unique(allind.begin(),allind.end())-allind.begin());
sz=(int)allind.size();
vector<vector<pair<int,pair<int,int>>>>quer(sz+10);
vector<vector<int>>addy(sz+1);
for(int i=0;i<n;i++){
int p=lower_bound(allind.begin(),allind.end(),all[i].second)-allind.begin();
int pp=lower_bound(allind.begin(),allind.end(),all[i].first)-allind.begin();
addy[p].push_back(pp);
}
vector<int>res(m+10);
for(int i=0;i<m;i++){
int l,r;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

art.cpp: In function 'int main()':
art.cpp:49:35: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   49 |     if((int)vv.size()>0&&vv.back()==v.size()){
      |                          ~~~~~~~~~^~~~~~~~~~
art.cpp:55:35: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   55 |     if((int)vv.size()>0&&vv.back()==v.size()){
      |                          ~~~~~~~~~^~~~~~~~~~
interface.cpp: In function 'int publish(std::vector<int>)':
interface.cpp:20:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
interface.cpp: In function 'void answer(std::vector<int>)':
interface.cpp:36:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   36 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
/usr/bin/ld: /tmp/ccuK8K7K.o: in function `main':
interface.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cczBhPKN.o:art.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccuK8K7K.o: in function `main':
interface.cpp:(.text.startup+0x16): undefined reference to `solve(int)'
collect2: error: ld returned 1 exit status