| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 503632 | andrei_boaca | Triangles (CEOI18_tri) | C++17 | 1568 ms | 262148 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "trilib.h"
//#include "trilib.c"
using namespace std;
map<vector<int>,bool> f;
set<int> border;
bool isgood(int a,int b,int c)
{
vector<int> v;
v.push_back(a);
v.push_back(b);
v.push_back(c);
sort(v.begin(),v.end());
if(f.count(v)==0)
f[v]=is_clockwise(v[0],v[1],v[2]);
bool ans=f[v];
int nr=0;
if(a!=v[0])
nr++;
if(b!=v[1])
nr++;
if(c!=v[2])
nr++;
if(nr%2==0&&nr>0)
ans=!ans;
return ans;
}
int main()
{
int n;
n=get_n();
for(int i=1;i<=n;i++)
if(border.find(i)==border.end())
{
int j=1;
if(i==1)
j=2;
int good=2;
int val=-1;
for(int k=1;k<=n;k++)
if(k!=i&&k!=j)
if(isgood(i,j,k))
j=k;
for(int k=1;k<=n;k++)
if(k!=i&&k!=j)
if(isgood(i,j,k))
good=0;
if(good)
{
border.insert(i);
border.insert(j);
}
}
int ans=border.size();
give_answer(ans);
/*cout<<'\n';
for(auto i:border)
cout<<i<<' ';*/
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
