제출 #836735

#제출 시각아이디문제언어결과실행 시간메모리
836735FulopMate분수 공원 (IOI21_parks)C++17
0 / 100
0 ms212 KiB
#include "parks.h" #include <bits/stdc++.h> using namespace std; struct fountain{ int x, y, ind; bool operator<(auto&other){ return make_pair(x, y)<make_pair(other.x, other.y); } }; int construct_roads(vector<int> x, vector<int> y) { int n = x.size(); vector<fountain> v; for(int i = 0; i < n; i++){ v.push_back({y[i], x[i], i}); // FORDITOTT KOORDINATAK!!!!!4!!1!!!14!44!!! } sort(v.begin(), v.end()); int el = v[0].x; vector<int> ru, rv, ra, rb; for(int i = 1; i < n; i++){ if(v[i-1].x == v[i].x){ ru.push_back(v[i-1].ind); rv.push_back(v[i].ind); ra.push_back(v[i].x+1); rb.push_back(3); } else if(v[i-1].y == v[i].y && v[i].x-v[i-1].x == 2){ ru.push_back(v[i-1].ind); rv.push_back(v[i].ind); ra.push_back(v[i].x-1); rb.push_back(v[i].y == 2 ? 1 : 5); el = v[i].x; } if(i > 1){ if(v[i-2].x == v[i].x){ ru.push_back(v[i-2].ind); rv.push_back(v[i].ind); ra.push_back(v[i].x+1); rb.push_back(3); } else if(v[i-2].y == v[i].y && v[i].x-v[i-2].x == 2){ ru.push_back(v[i-2].ind); rv.push_back(v[i].ind); ra.push_back(v[i].x-1); rb.push_back(v[i].y == 2 ? 1 : 5); el = v[i].x; } } } if(el == v.back().x){ build(rv, ru, rb, ra); return 1; } else { return 0; } }

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

parks.cpp:8:20: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
    8 |     bool operator<(auto&other){
      |                    ^~~~
#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...