# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
165273 | itiam | Košnja (COCI17_kosnja) | Cpython 3 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main(){
int N,X,Y,Z,br;
cin >> N;
string k="";
for (int i=0;i<N;i++){
if (i!=0) k+="\n";
br=0;
cin >> X >> Y;
if (Y<X) Z=Y;
else Z=X;
br=(Z*2)-2;
stringstream ss;
ss << br;
string str = ss.str();
k+=str;
//cout << "k: " << k;
}
cout << k;
return 0;
}