#include<bits/stdc++.h>
using namespace std ;
#define maxn 250009
#define ll long long
#define pb push_back
#define fi first
#define se second
#define left id<<1
#define right id<<1|1
#define re exit(0);
#define _lower(x) lower_bound(v.begin(),v.end(),x)-v.begin()+1
#define TIME (1.0*clock()/CLOCK_PERS_SEC)
const int mod = 1e9+7 ;
const int INF = 1e9 ;
typedef vector<int> vi ;
typedef pair<int,int> pii ;
typedef vector<pii> vii ;
void add ( int &a , int b )
{
a += b ;
if ( a >= mod ) a -= mod ;
if ( a < 0 ) a += mod ;
}
template < typename T > void chkmin ( T &a , T b ) { if ( a > b ) a = b ;}
template < typename T > void chkmax ( T &a , T b ) { if ( a < b ) a = b ;}
void rf ()
{
freopen("bai1.inp","r",stdin) ;
}
int _pow ( int a , int n )
{
if ( n == 0 ) return 1 ;
int res = _pow (a,n/2) ;
if ( n % 2 ) return 1ll*res*res%mod*a%mod ;
else return 1ll*res*res%mod ;
}
mt19937 rng(time(0)) ;
//#include "grader.h"
int n , m ;
vi u , v , w ;
int Max_w ;
void init ( int N , int M , vi U , vi V , vi W )
{
n = N , m = M , u = U , v = V , w = W ;
for ( auto x : W ) chkmax (Max_w,x) ;
}
int getMinimumFuelCapacity ( int x , int y )
{
if ( n == 2 || m == n-1 ) return -1 ;
return Max_w ;
}
Compilation message
swap.cpp: In function 'void rf()':
swap.cpp:33:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
33 | freopen("bai1.inp","r",stdin) ;
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
452 KB |
Output is correct |
9 |
Correct |
17 ms |
4688 KB |
Output is correct |
10 |
Correct |
25 ms |
5852 KB |
Output is correct |
11 |
Correct |
23 ms |
5616 KB |
Output is correct |
12 |
Correct |
22 ms |
5964 KB |
Output is correct |
13 |
Correct |
22 ms |
5976 KB |
Output is correct |
14 |
Correct |
21 ms |
5208 KB |
Output is correct |
15 |
Correct |
60 ms |
9948 KB |
Output is correct |
16 |
Correct |
65 ms |
9732 KB |
Output is correct |
17 |
Correct |
65 ms |
10172 KB |
Output is correct |
18 |
Correct |
60 ms |
10172 KB |
Output is correct |
19 |
Correct |
35 ms |
6344 KB |
Output is correct |
20 |
Correct |
58 ms |
10800 KB |
Output is correct |
21 |
Correct |
65 ms |
11044 KB |
Output is correct |
22 |
Correct |
62 ms |
11552 KB |
Output is correct |
23 |
Correct |
62 ms |
11452 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Incorrect |
59 ms |
9204 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
452 KB |
Output is correct |
9 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
452 KB |
Output is correct |
9 |
Correct |
17 ms |
4688 KB |
Output is correct |
10 |
Correct |
25 ms |
5852 KB |
Output is correct |
11 |
Correct |
23 ms |
5616 KB |
Output is correct |
12 |
Correct |
22 ms |
5964 KB |
Output is correct |
13 |
Correct |
22 ms |
5976 KB |
Output is correct |
14 |
Correct |
21 ms |
5208 KB |
Output is correct |
15 |
Correct |
60 ms |
9948 KB |
Output is correct |
16 |
Correct |
65 ms |
9732 KB |
Output is correct |
17 |
Correct |
65 ms |
10172 KB |
Output is correct |
18 |
Correct |
60 ms |
10172 KB |
Output is correct |
19 |
Incorrect |
59 ms |
9204 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |