Submission #381340

#TimeUsernameProblemLanguageResultExecution timeMemory
381340Madiyar_botKošnja (COCI17_kosnja)C++11
50 / 50
134 ms1000 KiB
#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 (stderr)

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 timeMemoryGrader output
Fetching results...