제출 #79488

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
794882018-10-14 12:59:54PlurmPort Facility (JOI17_port_facility)C++11
0 / 100
532 ms587488 KiB
#include <bits/stdc++.h>
using namespace std;
vector<int> g[1000005];
int col[1000005];
bool dfs(int u,int p = -1,int c = 1){
col[u] = c;
c = c % 2 + 1;
for(int v : g[u]){
if(v == p) continue;
if(col[v] && col[v] != c) return false;
if(col[v]) continue;
if(!dfs(v,u,c)) return false;
}
return true;
}
int segT[8000005];
int lb[8000005];
int rb[8000005];
vector<int> cmpsegT[8000005];
vector<int> cmpsegTmn[8000005];
vector<int> cmpsegTmx[8000005];
vector<pair<int,int> > pts;
void build(int c,int l,int r){
lb[c] = l;
rb[c] = r;
if(l == r){
segT[c] = pts[l].first;
cmpsegT[c].push_back(0);
cmpsegT[c].push_back(pts[l].first);
cmpsegTmx[c].push_back(0);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

port_facility.cpp: In function 'void build(int, int, int)':
port_facility.cpp:45:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(ll < cmpsegT[2*c].size() && rr < cmpsegT[2*c+1].size()){
        ~~~^~~~~~~~~~~~~~~~~~~~~
port_facility.cpp:45:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(ll < cmpsegT[2*c].size() && rr < cmpsegT[2*c+1].size()){
                                    ~~~^~~~~~~~~~~~~~~~~~~~~~~
port_facility.cpp:58:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(ll < cmpsegT[2*c].size()){
        ~~~^~~~~~~~~~~~~~~~~~~~~
port_facility.cpp:64:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(rr < cmpsegT[2*c+1].size()){
        ~~~^~~~~~~~~~~~~~~~~~~~~~~
port_facility.cpp: In function 'void updatemin(std::vector<int>&, int, int)':
port_facility.cpp:72:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(idx < FT.size()){
        ~~~~^~~~~~~~~~~
port_facility.cpp: In function 'void updatemax(std::vector<int>&, int, int)':
port_facility.cpp:78:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(idx < FT.size()){
        ~~~~^~~~~~~~~~~
port_facility.cpp: In function 'int main()':
port_facility.cpp:139:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
  ~~~~~^~~~~~~~~
port_facility.cpp:142:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d",&a,&b);
   ~~~~~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...