Submission #287822

# Submission time Handle Problem Language Result Execution time Memory
287822 2020-09-01T03:24:30 Z chubyxdxd Košnja (COCI17_kosnja) C++17
50 / 50
110 ms 1272 KB
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#define all(a) a.begin(),a.end()
#define allr(a) a.rbegin(),a.rend()
#define ff first
#define sc second
#define INF 3000000000
#define SINF 2*(1e18)
#define inf -10000000
#define pb push_back
#define forr(i,p,n) for(int i=p;i<n;i++)
#define mpk make_pair
#define upb(a,s) upper_bound(a.begin(),a.end(),s)
#define lwb(a,s) lower_bound(a.begin(),a.end(),s)
#define mem(a,val) memset(a,val,sizeof a)
#define cc continue
#define eb emplace_back
#define bb break
#define mostbit(n) 32-__builtin_clz(n)-1
#define time_to_forget cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n"
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef pair<ll,ll> ii;
typedef vector<ii> vii;
typedef vector<ll> vi;
typedef vector<vi> vvi;
//typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> order_set;
int x[]={0,1,0,-1};
int y[]={1,0,-1,0};
//priority_queue<ll> pq;
ll gcd(ll a,ll b){
    if(a%b==0)return b;
    return gcd(b,a%b);
}
ll fastpow(ll a,ll b){
    if(b==0)return 1ll;
    if(b==1)return a;
    ll sw;
    if(b%2==1)sw=a;
    else sw=1;
    ll h=fastpow(a,b/2);
    return h*h*sw;
}
int main()
{
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie();
    ll a,b,c,d,n,t,m,k;
    cin>>t;
    while(t--){
      cin>>n>>m;
      cout<<(min(n,m)-1)*2<<endl;
    }
    time_to_forget;
  return 0;
}

Compilation message

kosnja.cpp: In function 'int main()':
kosnja.cpp:49:8: warning: unused variable 'a' [-Wunused-variable]
   49 |     ll a,b,c,d,n,t,m,k;
      |        ^
kosnja.cpp:49:10: warning: unused variable 'b' [-Wunused-variable]
   49 |     ll a,b,c,d,n,t,m,k;
      |          ^
kosnja.cpp:49:12: warning: unused variable 'c' [-Wunused-variable]
   49 |     ll a,b,c,d,n,t,m,k;
      |            ^
kosnja.cpp:49:14: warning: unused variable 'd' [-Wunused-variable]
   49 |     ll a,b,c,d,n,t,m,k;
      |              ^
kosnja.cpp:49:22: warning: unused variable 'k' [-Wunused-variable]
   49 |     ll a,b,c,d,n,t,m,k;
      |                      ^
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 71 ms 1020 KB Output is correct
7 Correct 110 ms 1272 KB Output is correct
8 Correct 76 ms 1016 KB Output is correct
9 Correct 109 ms 1264 KB Output is correct
10 Correct 74 ms 1016 KB Output is correct