제출 #23704

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
237042017-05-21 22:34:42Hiasat친구 (IOI14_friend)C++14
23 / 100
0 ms3360 KiB
#include "friend.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> adj[1002];
int c[1002],vis[1001],vsId,match[1001];
vector<int> fv[2];
void dfs(int u , int color){
if(c[u] != -1){
assert(c[u] == color);
return;
}
c[u] = color;
fv[color].push_back(u);
for (int i = 0; i < adj[u].size(); ++i){
dfs(adj[u][i],!color);
}
}
bool findMatch(int u){
vis[u] = vsId;
for (int i = 0; i < adj[u].size(); ++i){
int v = adj[u][i];
if(match[v] == -1 || vis[match[v]] != vsId && findMatch(match[v])){
match[v] = u;
return true;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

friend.cpp: In function 'void dfs(int, int)':
friend.cpp:20:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < adj[u].size(); ++i){
                    ^
friend.cpp: In function 'bool findMatch(int)':
friend.cpp:26:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < adj[u].size(); ++i){
                    ^
friend.cpp:28:46: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   if(match[v] == -1 || vis[match[v]] != vsId && findMatch(match[v])){   
                                              ^
friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:43:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(int j = 0 ; j < adj[host[i]].size();j++){
                      ^
friend.cpp:57:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0 ; j < fv[0].size();j++){
                     ^
#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...