Submission #1018054

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10180542024-07-09 13:24:07serkanrashidFriend (IOI14_friend)C++14
46 / 100
17 ms4440 KiB
#include "friend.h"
#include <bits/stdc++.h>
using namespace std;
struct FlowEdge
{
int v,u;
long long cap,flow = 0;
FlowEdge(int v, int u, long long cap) : v(v), u(u), cap(cap) {}
};
struct Dinic
{
const long long flow_inf = 1e18;
vector<FlowEdge> edges;
vector<vector<int>> adj;
int s,t,n,m = 0;
vector<int> level, ptr;
queue<int>q;
Dinic(int n, int s, int t) : n(n), s(s), t(t)
{
adj.resize(n);
level.resize(n);
ptr.resize(n);
}
void add_edge(int v, int u, long long cap)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

friend.cpp: In constructor 'Dinic::Dinic(int, int, int)':
friend.cpp:19:13: warning: 'Dinic::n' will be initialized after [-Wreorder]
   19 |     int s,t,n,m = 0;
      |             ^
friend.cpp:19:9: warning:   'int Dinic::s' [-Wreorder]
   19 |     int s,t,n,m = 0;
      |         ^
friend.cpp:23:5: warning:   when initialized here [-Wreorder]
   23 |     Dinic(int n, int s, int t) : n(n), s(s), t(t)
      |     ^~~~~
friend.cpp: In member function 'long long int Dinic::dfs(int, long long int)':
friend.cpp:61:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   61 |         for(int &cid = ptr[v];cid < adj[v].size(); cid++)
      |                               ~~~~^~~~~~~~~~~~~~~
#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...