답안 #791214

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
791214 2023-07-23T16:23:04 Z Khizri 말 (IOI15_horses) C++17
100 / 100
554 ms 54028 KB
#include "horses.h"
#include <bits/stdc++.h>
using namespace std;
#define ll unsigned long long
#define pb push_back
#define F first
#define S second
#define INF 1e18
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define pii pair<int,int>
#define pll pair<ll,ll>
#define OK cout<<"Ok"<<endl;
#define MOD (ll)(1e9+7)
const int mxn=5e5+5;
ll n,idx[mxn],arr[mxn],tree2[mxn*4];
ll tree[4*mxn];
set<int>st;
void build(int node,int l,int r){
    if(l==r){
        tree[node]=idx[l];
        return;
    }
    int m=(l+r)/2;
    build(2*node,l,m);
    build(2*node+1,m+1,r);
    tree[node]=(tree[2*node]*tree[2*node+1])%MOD;
}
void build2(int node,int l,int r){
    if(l==r){
        tree2[node]=arr[l];
        return;
    }
    int m=(l+r)/2;
    build2(2*node,l,m);
    build2(2*node+1,m+1,r);
    tree2[node]=max(tree2[2*node],tree2[2*node+1]);
}
void update(int node,int l,int r,int pos,int val){
    if(l>pos||r<pos) return;
    if(l==r){
        tree[node]=val;
        return;
    }
    int m=(l+r)/2;
    update(2*node,l,m,pos,val);
    update(2*node+1,m+1,r,pos,val);
    tree[node]=(tree[2*node]*tree[2*node+1])%MOD;
}
void update2(int node,int l,int r,int pos,int val){
    if(l>pos||r<pos) return;
    if(l==r){
        tree2[node]=val;
        return;
    }
    int m=(l+r)/2;
    update2(2*node,l,m,pos,val);
    update2(2*node+1,m+1,r,pos,val);
    tree2[node]=max(tree2[2*node],tree2[2*node+1]);
}
ll query(int node,int l,int r,int ql,int qr){
    if(l>qr||r<ql) return 1;
    if(ql<=l&&r<=qr) return tree[node];
    int m=(l+r)/2;
    return (query(2*node,l,m,ql,qr)*query(2*node+1,m+1,r,ql,qr))%MOD;
}
int query2(int node,int l,int r,int ql,int qr){
    if(l>qr||r<ql) return 0;
    if(ql<=l&&r<=qr) return tree2[node];
    int m=(l+r)/2;
    return max(query2(2*node,l,m,ql,qr),query2(2*node+1,m+1,r,ql,qr));
}
int init(int N, int X[], int Y[]) {
	n=N;
	for(int i=0;i<n;i++){
        arr[i+1]=Y[i];
        idx[i+1]=X[i];
        if(idx[i+1]>1){
            st.insert(i+1);
        }
	}
	build(1,1,n);
	build2(1,1,n);
	int k=min(64,(int)st.size());
	auto it=st.end();
	ll res=query2(1,1,n,1,n);
	if(st.size()){
        it=--st.end();
	}
	else{
        return res;
	}
	ll a=1;
	vector<int>vt;
	while(k--){
        int x=*it;
        a=1ll*a*idx[x];
        vt.pb(x);
        if(a>=1e9) break;
        it--;
	}
	__int128 ans=1;
	__int128 mx=1;
	reverse(all(vt));
	int q=-1;
	vt.pb(n+1);
	for(int i=0;i<vt.size()-1;i++){
        __int128 qq=idx[vt[i]];;
        ans*=qq;
        int l=vt[i],r=vt[i+1]-1;
        qq=query2(1,1,n,l,n);
        __int128 k=ans*qq;
        if(k>mx){
            mx=k;
            q=i;
        }
	}
	if(q==-1) return res;
	__int128 qw=query2(1,1,n,1,n);
	if(qw>mx){
        return query2(1,1,n,1,n);
	}
	int l=vt[q],r=vt[q+1]-1;
	res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
	return res;
}

int updateX(int pos, int val) {
	pos++;
	if(idx[pos]>1){
        st.erase(pos);
	}
	idx[pos]=val;
	if(idx[pos]>1){
        st.insert(pos);
	}
	update(1,1,n,pos,val);
	int k=min(64,(int)st.size());
	auto it=st.end();
	ll res=query2(1,1,n,1,n);
	if(st.size()){
        it=--st.end();
	}
	else{
        return res;
	}
	ll a=1;
	vector<int>vt;
	while(k--){
        int x=*it;
        a=1ll*a*idx[x];
        vt.pb(x);
        if(a>=1e9) break;
        it--;
	}
	__int128 ans=1;
	__int128 mx=1;
	reverse(all(vt));
	int q=-1;
	vt.pb(n+1);
	for(int i=0;i<vt.size()-1;i++){
        __int128 qq=idx[vt[i]];;
        ans*=qq;
        int l=vt[i],r=vt[i+1]-1;
        qq=query2(1,1,n,l,n);
        __int128 k=ans*qq;
        if(k>mx){
            mx=k;
            q=i;
        }
	}
	if(q==-1) return res;
	__int128 qw=query2(1,1,n,1,n);
	if(qw>mx){
        return query2(1,1,n,1,n);
	}
	int l=vt[q],r=vt[q+1]-1;
	res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
	return res;
}

int updateY(int pos, int val) {
	pos++;
	arr[pos]=val;
	update2(1,1,n,pos,val);
	int k=min(64,(int)st.size());
	auto it=st.end();
	ll res=query2(1,1,n,1,n);
	if(st.size()){
        it=--st.end();
	}
	else{
        return res;
	}
	ll a=1;
	vector<int>vt;
	while(k--){
        int x=*it;
        a=1ll*a*idx[x];
        vt.pb(x);
        if(a>=1e9) break;
        it--;
	}
	__int128 ans=1;
	__int128 mx=1;
	reverse(all(vt));
	int q=-1;
	vt.pb(n+1);
	for(int i=0;i<vt.size()-1;i++){
        __int128 qq=idx[vt[i]];;
        ans*=qq;
        int l=vt[i],r=vt[i+1]-1;
        qq=query2(1,1,n,l,n);
        __int128 k=ans*qq;
        if(k>mx){
            mx=k;
            q=i;
        }
	}
	if(q==-1) return res;
	__int128 qw=query2(1,1,n,1,n);
	if(qw>mx){
        return query2(1,1,n,1,n);
	}
	int l=vt[q],r=vt[q+1]-1;
	res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
	return res;
}

Compilation message

horses.cpp: In function 'int query2(int, int, int, int, int)':
horses.cpp:69:39: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
   69 |     if(ql<=l&&r<=qr) return tree2[node];
      |                             ~~~~~~~~~~^
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:75:15: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int' [-Wsign-compare]
   75 |  for(int i=0;i<n;i++){
      |              ~^~
horses.cpp:82:12: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
   82 |  build(1,1,n);
      |            ^
horses.cpp:83:13: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
   83 |  build2(1,1,n);
      |             ^
horses.cpp:86:20: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
   86 |  ll res=query2(1,1,n,1,n);
      |                    ^
horses.cpp:86:24: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
   86 |  ll res=query2(1,1,n,1,n);
      |                        ^
horses.cpp:91:16: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
   91 |         return res;
      |                ^~~
horses.cpp:99:12: warning: conversion from 'long long unsigned int' to 'double' may change value [-Wconversion]
   99 |         if(a>=1e9) break;
      |            ^
horses.cpp:106:9: warning: conversion from 'long long unsigned int' to 'std::vector<int>::value_type' {aka 'int'} may change value [-Wconversion]
  106 |  vt.pb(n+1);
      |        ~^~
horses.cpp:107:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  107 |  for(int i=0;i<vt.size()-1;i++){
      |              ~^~~~~~~~~~~~
horses.cpp:111:23: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  111 |         qq=query2(1,1,n,l,n);
      |                       ^
horses.cpp:111:27: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  111 |         qq=query2(1,1,n,l,n);
      |                           ^
horses.cpp:112:18: warning: declaration of 'k' shadows a previous local [-Wshadow]
  112 |         __int128 k=ans*qq;
      |                  ^
horses.cpp:84:6: note: shadowed declaration is here
   84 |  int k=min(64,(int)st.size());
      |      ^
horses.cpp:110:21: warning: unused variable 'r' [-Wunused-variable]
  110 |         int l=vt[i],r=vt[i+1]-1;
      |                     ^
horses.cpp:118:19: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  118 |  if(q==-1) return res;
      |                   ^~~
horses.cpp:119:25: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  119 |  __int128 qw=query2(1,1,n,1,n);
      |                         ^
horses.cpp:119:29: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  119 |  __int128 qw=query2(1,1,n,1,n);
      |                             ^
horses.cpp:121:27: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  121 |         return query2(1,1,n,1,n);
      |                           ^
horses.cpp:121:31: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  121 |         return query2(1,1,n,1,n);
      |                               ^
horses.cpp:124:21: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  124 |  res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
      |                     ^
horses.cpp:124:43: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  124 |  res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
      |                                           ^
horses.cpp:124:47: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  124 |  res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
      |                                               ^
horses.cpp:125:9: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  125 |  return res;
      |         ^~~
horses.cpp:123:14: warning: unused variable 'r' [-Wunused-variable]
  123 |  int l=vt[q],r=vt[q+1]-1;
      |              ^
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:137:13: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  137 |  update(1,1,n,pos,val);
      |             ^
horses.cpp:140:20: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  140 |  ll res=query2(1,1,n,1,n);
      |                    ^
horses.cpp:140:24: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  140 |  ll res=query2(1,1,n,1,n);
      |                        ^
horses.cpp:145:16: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  145 |         return res;
      |                ^~~
horses.cpp:153:12: warning: conversion from 'long long unsigned int' to 'double' may change value [-Wconversion]
  153 |         if(a>=1e9) break;
      |            ^
horses.cpp:160:9: warning: conversion from 'long long unsigned int' to 'std::vector<int>::value_type' {aka 'int'} may change value [-Wconversion]
  160 |  vt.pb(n+1);
      |        ~^~
horses.cpp:161:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  161 |  for(int i=0;i<vt.size()-1;i++){
      |              ~^~~~~~~~~~~~
horses.cpp:165:23: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  165 |         qq=query2(1,1,n,l,n);
      |                       ^
horses.cpp:165:27: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  165 |         qq=query2(1,1,n,l,n);
      |                           ^
horses.cpp:166:18: warning: declaration of 'k' shadows a previous local [-Wshadow]
  166 |         __int128 k=ans*qq;
      |                  ^
horses.cpp:138:6: note: shadowed declaration is here
  138 |  int k=min(64,(int)st.size());
      |      ^
horses.cpp:164:21: warning: unused variable 'r' [-Wunused-variable]
  164 |         int l=vt[i],r=vt[i+1]-1;
      |                     ^
horses.cpp:172:19: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  172 |  if(q==-1) return res;
      |                   ^~~
horses.cpp:173:25: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  173 |  __int128 qw=query2(1,1,n,1,n);
      |                         ^
horses.cpp:173:29: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  173 |  __int128 qw=query2(1,1,n,1,n);
      |                             ^
horses.cpp:175:27: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  175 |         return query2(1,1,n,1,n);
      |                           ^
horses.cpp:175:31: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  175 |         return query2(1,1,n,1,n);
      |                               ^
horses.cpp:178:21: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  178 |  res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
      |                     ^
horses.cpp:178:43: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  178 |  res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
      |                                           ^
horses.cpp:178:47: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  178 |  res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
      |                                               ^
horses.cpp:179:9: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  179 |  return res;
      |         ^~~
horses.cpp:177:14: warning: unused variable 'r' [-Wunused-variable]
  177 |  int l=vt[q],r=vt[q+1]-1;
      |              ^
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:185:14: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  185 |  update2(1,1,n,pos,val);
      |              ^
horses.cpp:188:20: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  188 |  ll res=query2(1,1,n,1,n);
      |                    ^
horses.cpp:188:24: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  188 |  ll res=query2(1,1,n,1,n);
      |                        ^
horses.cpp:193:16: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  193 |         return res;
      |                ^~~
horses.cpp:201:12: warning: conversion from 'long long unsigned int' to 'double' may change value [-Wconversion]
  201 |         if(a>=1e9) break;
      |            ^
horses.cpp:208:9: warning: conversion from 'long long unsigned int' to 'std::vector<int>::value_type' {aka 'int'} may change value [-Wconversion]
  208 |  vt.pb(n+1);
      |        ~^~
horses.cpp:209:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  209 |  for(int i=0;i<vt.size()-1;i++){
      |              ~^~~~~~~~~~~~
horses.cpp:213:23: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  213 |         qq=query2(1,1,n,l,n);
      |                       ^
horses.cpp:213:27: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  213 |         qq=query2(1,1,n,l,n);
      |                           ^
horses.cpp:214:18: warning: declaration of 'k' shadows a previous local [-Wshadow]
  214 |         __int128 k=ans*qq;
      |                  ^
horses.cpp:186:6: note: shadowed declaration is here
  186 |  int k=min(64,(int)st.size());
      |      ^
horses.cpp:212:21: warning: unused variable 'r' [-Wunused-variable]
  212 |         int l=vt[i],r=vt[i+1]-1;
      |                     ^
horses.cpp:220:19: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  220 |  if(q==-1) return res;
      |                   ^~~
horses.cpp:221:25: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  221 |  __int128 qw=query2(1,1,n,1,n);
      |                         ^
horses.cpp:221:29: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  221 |  __int128 qw=query2(1,1,n,1,n);
      |                             ^
horses.cpp:223:27: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  223 |         return query2(1,1,n,1,n);
      |                           ^
horses.cpp:223:31: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  223 |         return query2(1,1,n,1,n);
      |                               ^
horses.cpp:226:21: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  226 |  res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
      |                     ^
horses.cpp:226:43: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  226 |  res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
      |                                           ^
horses.cpp:226:47: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  226 |  res=(1ll*query(1,1,n,1,vt[q])*query2(1,1,n,l,n))%MOD;
      |                                               ^
horses.cpp:227:9: warning: conversion from 'long long unsigned int' to 'int' may change value [-Wconversion]
  227 |  return res;
      |         ^~~
horses.cpp:225:14: warning: unused variable 'r' [-Wunused-variable]
  225 |  int l=vt[q],r=vt[q+1]-1;
      |              ^
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 340 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 228 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 1 ms 340 KB Output is correct
25 Correct 1 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 3 ms 340 KB Output is correct
28 Correct 2 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 456 KB Output is correct
31 Correct 2 ms 340 KB Output is correct
32 Correct 3 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 554 ms 52932 KB Output is correct
2 Correct 278 ms 53056 KB Output is correct
3 Correct 289 ms 52848 KB Output is correct
4 Correct 358 ms 52952 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 2 ms 340 KB Output is correct
25 Correct 2 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 3 ms 340 KB Output is correct
28 Correct 2 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 2 ms 404 KB Output is correct
32 Correct 3 ms 340 KB Output is correct
33 Correct 42 ms 29780 KB Output is correct
34 Correct 39 ms 29732 KB Output is correct
35 Correct 181 ms 53204 KB Output is correct
36 Correct 149 ms 53172 KB Output is correct
37 Correct 64 ms 29792 KB Output is correct
38 Correct 87 ms 41676 KB Output is correct
39 Correct 31 ms 29548 KB Output is correct
40 Correct 136 ms 53168 KB Output is correct
41 Correct 49 ms 29688 KB Output is correct
42 Correct 63 ms 29712 KB Output is correct
43 Correct 127 ms 53112 KB Output is correct
44 Correct 130 ms 52912 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 1 ms 340 KB Output is correct
25 Correct 1 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 3 ms 340 KB Output is correct
28 Correct 3 ms 444 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 468 KB Output is correct
31 Correct 2 ms 404 KB Output is correct
32 Correct 3 ms 408 KB Output is correct
33 Correct 517 ms 53956 KB Output is correct
34 Correct 271 ms 53908 KB Output is correct
35 Correct 291 ms 54028 KB Output is correct
36 Correct 365 ms 53964 KB Output is correct
37 Correct 42 ms 29644 KB Output is correct
38 Correct 42 ms 29736 KB Output is correct
39 Correct 156 ms 52996 KB Output is correct
40 Correct 150 ms 53064 KB Output is correct
41 Correct 66 ms 29640 KB Output is correct
42 Correct 89 ms 41672 KB Output is correct
43 Correct 31 ms 29444 KB Output is correct
44 Correct 133 ms 52972 KB Output is correct
45 Correct 50 ms 29604 KB Output is correct
46 Correct 65 ms 29548 KB Output is correct
47 Correct 128 ms 52968 KB Output is correct
48 Correct 126 ms 52984 KB Output is correct
49 Correct 153 ms 31564 KB Output is correct
50 Correct 131 ms 31272 KB Output is correct
51 Correct 288 ms 53692 KB Output is correct
52 Correct 198 ms 53524 KB Output is correct
53 Correct 443 ms 31180 KB Output is correct
54 Correct 260 ms 43992 KB Output is correct
55 Correct 107 ms 29312 KB Output is correct
56 Correct 230 ms 53464 KB Output is correct
57 Correct 287 ms 30004 KB Output is correct
58 Correct 437 ms 30064 KB Output is correct
59 Correct 129 ms 52548 KB Output is correct