답안 #796815

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
796815 2023-07-28T19:13:08 Z raphaelp Zapina (COCI20_zapina) C++14
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>using namespace std;int main(){    int N;    cin>>N;    long long tot=1;    for(int i=0; i<N; i++)    {        tot*=N;        tot= tot%1000000007;    }    vector<vector<long long>> tab (N+1, vector<int> (N,0));    tab[1][0]=1;    for (long long i=1; i<N; i++)    {        for (long long j=0; j<=N; j++)        {            if (tab[i][j]==0) break;            long long mult=1;            for (long long p=0; p<=min(i,N-j); p++)            {                tab[i+1][j+p]+=tab[i][j]*mult;                tab[i+1][j+p]=tab[i+1][j+p]%1000000007;                mult*=N-j-p;                mult=mult%1000000007;            }        }    }    tot-=tab[N][N];    tot=tot%1000000007;    cout<<tot;}

Compilation message

zapina.cpp:1:30: warning: extra tokens at end of #include directive
    1 | #include<bits/stdc++.h>using namespace std;int main(){    int N;    cin>>N;    long long tot=1;    for(int i=0; i<N; i++)    {        tot*=N;        tot= tot%1000000007;    }    vector<vector<long long>> tab (N+1, vector<int> (N,0));    tab[1][0]=1;    for (long long i=1; i<N; i++)    {        for (long long j=0; j<=N; j++)        {            if (tab[i][j]==0) break;            long long mult=1;            for (long long p=0; p<=min(i,N-j); p++)            {                tab[i+1][j+p]+=tab[i][j]*mult;                tab[i+1][j+p]=tab[i+1][j+p]%1000000007;                mult*=N-j-p;                mult=mult%1000000007;            }        }    }    tot-=tab[N][N];    tot=tot%1000000007;    cout<<tot;}
      |                              ^~~~~~~~~
zapina.cpp:1:9: fatal error: bits/stdc++.h>usin: No such file or directory
    1 | #include<bits/stdc++.h>using namespace std;int main(){    int N;    cin>>N;    long long tot=1;    for(int i=0; i<N; i++)    {        tot*=N;        tot= tot%1000000007;    }    vector<vector<long long>> tab (N+1, vector<int> (N,0));    tab[1][0]=1;    for (long long i=1; i<N; i++)    {        for (long long j=0; j<=N; j++)        {            if (tab[i][j]==0) break;            long long mult=1;            for (long long p=0; p<=min(i,N-j); p++)            {                tab[i+1][j+p]+=tab[i][j]*mult;                tab[i+1][j+p]=tab[i+1][j+p]%1000000007;                mult*=N-j-p;                mult=mult%1000000007;            }        }    }    tot-=tab[N][N];    tot=tot%1000000007;    cout<<tot;}
      |         ^~~~~~~~~~~~~~~~~~~~
compilation terminated.