제출 #120383

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
1203832019-06-24 09:55:59tinderPort Facility (JOI17_port_facility)C++14
78 / 100
6094 ms466492 KiB
#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
const int maxn = 2e6 + 6;
const int mod = 1e9 + 7;
int n, s[maxn], t[maxn];
vector<int> g[maxn], w[maxn];
void add_edge(int u, int v, int col) {
w[u].emplace_back(col);
w[v].emplace_back(col);
g[u].emplace_back(v);
g[v].emplace_back(u);
}
struct info {
int x, id;
info () {}
info (int _x, int _id) {
x = _x, id = _id;
}
bool operator < (const info &that) const {
return x < that.x;
}
};
vector<info> ft[maxn];
vector<int> p[maxn];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

port_facility.cpp: In function 'void dfs(int)':
port_facility.cpp:55:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < g[u].size(); i++) {
                 ~~^~~~~~~~~~~~~
port_facility.cpp: In function 'int main(int, const char**)':
port_facility.cpp:103:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 1; j < p[i].size(); j++) {
                  ~~^~~~~~~~~~~~~
port_facility.cpp:88:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
  ~~~~~^~~~~~~~~~
port_facility.cpp:90:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d", &s[i], &t[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...