# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1098907 | alexander_707070 | 저울 (IOI15_scales) | C++14 | 58 ms | 596 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "scales.h"
using namespace std;
vector<int> p;
vector< vector<int> > perms,news;
int getmin(vector<int> s,int a,int b,int c){
if(s[a]<s[b] and s[a]<s[c])return 0;
if(s[b]<s[c] and s[b]<s[a])return 1;
return 2;
}
int getmax(vector<int> s,int a,int b,int c){
if(s[a]>s[b] and s[a]>s[c])return 0;
if(s[b]>s[c] and s[b]>s[a])return 1;
return 2;
}
int getmed(vector<int> s,int a,int b,int c){
if(s[a]<max(s[b],s[c]) and s[a]>min(s[b],s[c]))return 0;
if(s[b]<max(s[a],s[c]) and s[b]>min(s[a],s[c]))return 1;
return 2;
}
int getbro(vector<int> s,int a,int b,int c,int d){
if(s[a]<s[d] and s[b]<s[d] and s[c]<s[d])return getmin(s,a,b,c);
if(s[a]>s[d] and (s[b]<s[d] or s[a]<s[b]) and (s[c]<s[d] or s[a]<s[c]))return 0;
if(s[b]>s[d] and (s[a]<s[d] or s[b]<s[a]) and (s[c]<s[d] or s[b]<s[c]))return 1;
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |