# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
92102 | 314rate | Tavan (COCI16_tavan) | C++14 | 2 ms | 504 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int N=500+5;
const ll INF=(1LL<<60);
int n,hid,pos;
ll x;
ll add(ll a,ll b)
{
return min(a+b,INF);
}
ll mul(ll a,ll b)
{
if(a==INF || b==INF)
{
return INF;
}
if(a==0 || b==0)
{
return 0;
}
ll res=a*b;
if(res%a || res%b || res/a!=b || res/b!=a || res>=INF)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |