이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define fix fixed<<setprecision(20)
#define endl'\n'
#define c(x) cout<<x<<endl
#define int ll
 //int a[200090],pre[200090],suf[200090];
 int mx[]={0,0,-1,1},my[]={-1,1,0,0};
 int a[600][600];
 bool vis[200][200];
 int n,m;
 bool inside(int i,int j){
 return (i&&i<=n&&j&&j<=m);
    }
    void dfs (int i,int j){
        vis[i][j]=1;
        for(int k=0;k<4;k++){
            int nx=i+mx[k],ny=j+my[k];
            if(inside(nx,ny)&& !vis[nx][ny]&& a[nx][ny]=='*') { vis[nx][ny]=1;
            dfs(nx,ny);}
        }
    }
int32_t main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
 cin>>n;
 int ans=1;
int cnt= n;
int x=n-1;
for(int i=n-1;i>=1;i--){
    ans+= cnt*x;
    x*=(n-1);
    cnt*=i;
}
cout<<ans<<endl;}
컴파일 시 표준 에러 (stderr) 메시지
zapina.cpp:7:9: warning: ISO C++11 requires whitespace after the macro name
    7 | #define endl'\n'
      |         ^~~~| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |