Submission #753545

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7535452023-06-05 13:38:33minhcool이상적인 도시 (IOI12_city)C++17
100 / 100
55 ms18148 KiB
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef pair<ll, ll> ii;
typedef pair<ii, ll> iii;
typedef pair<ii, ii> iiii;
const ll N = 3e5 + 5;
const ll oo = 1e18 + 7, mod = 1e9 + 7;
ll n;
ll x[N], y[N], answer;
namespace cal{
vector<ll> Adj[N];
ll sz[N], szz[N];
struct comp{
ll st, en, rw;
comp(ll _rw, ll _st, ll _en): rw(_rw), st(_st), en(_en){}
};
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

city.cpp: In constructor 'cal::comp::comp(long long int, long long int, long long int)':
city.cpp:28:14: warning: 'cal::comp::rw' will be initialized after [-Wreorder]
   28 |   ll st, en, rw;
      |              ^~
city.cpp:28:6: warning:   'long long int cal::comp::st' [-Wreorder]
   28 |   ll st, en, rw;
      |      ^~
city.cpp:29:3: warning:   when initialized here [-Wreorder]
   29 |   comp(ll _rw, ll _st, ll _en): rw(_rw), st(_st), en(_en){}
      |   ^~~~
In file included from /usr/include/c++/10/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:45,
                 from /usr/include/c++/10/ext/pb_ds/detail/container_base_dispatch.hpp:90,
                 from /usr/include/c++/10/ext/pb_ds/assoc_container.hpp:48,
                 from city.cpp:2:
city.cpp: In function 'void cal::process()':
city.cpp:53:23: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} and 'long long int' [-Wsign-compare]
   53 |   assert(polls.size() == (n + 1));
      |          ~~~~~~~~~~~~~^~~~~~~~~~
city.cpp:65:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<cal::comp>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   65 |   for(ll i = 0; i < comps.size(); i++){
      |                 ~~^~~~~~~~~~~~~~
city.cpp:66:14: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<cal::comp>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   66 |    while(itr < comps.size() && ((comps[itr].rw <= comps[i].rw) || ((comps[itr].rw == (comps[i].rw + 1)) && (comps[itr].en < comps[i].st)))) itr++;
      |          ~~~~^~~~~~~~~~~~~~
city.cpp:68:15: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<cal::comp>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   68 |    while(temp < comps.size()){
      |          ~~~~~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...