제출 #447228

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4472282021-07-25 09:09:52YahliRoads (CEOI20_roads)C++14
0 / 100
74 ms2740 KiB
#include <bits/stdc++.h>
using namespace std;
using pi = pair<int, int>;
using ppi = pair<pi, pi>;
void process(vector<ppi> line){
if (line.size() <= 1) return;
for (int i = 1; i < line.size(); ++i){
cout << line[i-1].second.first << " " << line[i-1].second.second << " " << line[i].first.first << " " << line[i].first.second << "\n";
}
}
bool cmp(ppi f, ppi s){
if (f.first.second != s.first.second) return f.first.second < s.first.second;
return f.first.first < s.first.first;
}
int main(){
int n; cin >> n;
vector<ppi> data(n);
for (int i = 0; i < n; ++i){
cin >> data[i].first.first >> data[i].first.second >> data[i].second.first >> data[i].second.second;
if (data[i].first.first > data[i].second.first) swap(data[i].first, data[i].second);
}
sort(data.begin(), data.end(), cmp);
vector<ppi> line;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

roads.cpp: In function 'void process(std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > >)':
roads.cpp:10:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |     for (int i = 1; i < line.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...