| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 746532 | vjudge1 | Triangles (CEOI18_tri) | C++17 | 1 ms | 468 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "trilib.h"
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n=get_n();
vector<int>unnow;
if(is_clockwise(1,2,3)){
unnow.push_back(1);
unnow.push_back(2);
unnow.push_back(3);
}
else{
unnow.push_back(1);
unnow.push_back(3);
unnow.push_back(2);
}
for(int i=4;i<=n;i++){
vector<int>ted((int)unnow.size()+1);
int f=0;
if(!is_clockwise(unnow.back(),unnow[0],i)){
ted[(int)unnow.size()-1]++;
ted[0]++;
f=1;
}
for(int i=0;i<(int)unnow.size()-1;i++){
if(!is_clockwise(unnow[i],unnow[i+1],i)){
ted[i]++;
ted[i+1]++;
f=1;
}
}
if(f==0){
continue;
}
vector<int>fake;
int z=0;
for(int i=0;i<(int)unnow.size();i++){
if(ted[i]==2){
continue;
}
if(ted[i]==0){
fake.push_back(unnow[i]);
continue;
}
fake.push_back(unnow[i]);
if(i==(int)unnow.size()-1||ted[i+1]!=0){
fake.push_back(i);
}
}
swap(fake,unnow);
fake.clear();
}
give_answer((int)unnow.size());
}컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
