Submission #381340

# Submission time Handle Problem Language Result Execution time Memory
381340 2021-03-25T06:34:51 Z Madiyar_bot Košnja (COCI17_kosnja) C++11
50 / 50
134 ms 1000 KB
#include<bits/stdc++.h>
#define ll long long 
#define ld long double 
#define boost ios_base::sync_with_stdio(NULL) , cin.tie(NULL) , cout.tie(NULL);
#define pb push_back
#define in insert 
#define all(x) x.begin(),x.end()
#define sz(x) x.size()
using namespace std;
 
const int INF = int(1e9) + 7 ;
const int maxn = (int)1e5 + 1;
 
int n ; 
vector<int> v ; 

int main(){
	cin >> n ; 
	for(int i = 1 ; i <= n ; i ++ ){
		int x , y ; 
		cin >> x >> y ; 
		int mn = min( x , y ) ; 
		v.pb(mn * 2 - 2 ) ; 
	}
	for(int i = 0 ; i < sz(v) ; i++ ){
		cout << v[i] << endl; 
	}
}

Compilation message

kosnja.cpp: In function 'int main()':
kosnja.cpp:25:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 |  for(int i = 0 ; i < sz(v) ; i++ ){
      |                    ^
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 89 ms 748 KB Output is correct
7 Correct 134 ms 1000 KB Output is correct
8 Correct 90 ms 748 KB Output is correct
9 Correct 134 ms 1000 KB Output is correct
10 Correct 89 ms 748 KB Output is correct