# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
583209 | AGE | Zapina (COCI20_zapina) | C++14 | 1 ms | 256 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define int long long
using namespace std;
const int N=1e6,M=2e3,mod=1e9+7;
int cnt=0,n,vis[10];
set<vector<int>>st;
void bt(int index)
{
if(index==n)
{
int ok=0;
for(int j=1; j<=n; j++)
{
if(vis[j]>=j)
ok=1;
}
vector<int>v;
for(int j=1; j<=n; j++)
v.pb(vis[j]);
if(ok==1)
cnt++,st.insert(v);
return ;
}
for(int i=1; i<=n; i++)
{
vis[i]++;
bt(index+1);
vis[i]--;
}
}
main()
{
cin>>n;
bt(0);
cout<<st.size()<<endl;
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |