Submission #1868913


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
 
struct edge {int /*from,*/to,cost;};
typedef long long ll;
typedef pair<int,int> P;
typedef pair<pair<int,int>,int> PP;
typedef vector<int> VI;
typedef vector<long long int> VL;
typedef vector<edge> VE;
static const int MOD = 1000000007;
static const int INF = 2147483647;
//static const long long INF = 9223372000000000000;
//static const long long INF = 9223372000000000000/2;
//static const int INF = 1000010000;
//int dx4[4] = {0,1,0,-1}, dy4[4] = {-1,0,1,0};
//int dx5[5] = {-1,0,0,0,1}, dy5[5] = {0,-1,0,1,0};
//int dx8[8] = {-1,0,1,1,1,0,-1,-1}, dy8[8] = {1,1,1,0,-1,-1,-1,0};
//int dx9[9] = {-1,0,1,1,1,0,-1,-1,0}, dy9[9] = {1,1,1,0,-1,-1,-1,0,0};
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define np next_permutation
#define pq priority_queue
#define SZ(a) int((a).size())
#define LEN(a) int((a).length())
#define MAX(a,b,c) max((a),max((b),(c)))
#define MIN(a,b,c) min((a),min((b),(c)))
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define REP1(i,x) for(int i=1;i<=(int)(x);i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RREP1(i,x) for(int i=((int)(x));i>0;i--)
//#define int ll

int fact[114514];

void fact(){
    fact[0] = fact[1] = 1;
    REP1(i,114513){
        fact[i] = (fact[i-1] * i) % MOD;
    }
}

signed main(){
    int n;
    f();
    printf("%d\n",fact[n]);
    return 0;
}

Submission Info

Submission Time
Task B - Training Camp
User r67pr
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1574 Byte
Status CE

Compile Error

./Main.cpp: In function ‘void fact()’:
./Main.cpp:41:11: error: ‘void fact()’ redeclared as different kind of symbol
 void fact(){
           ^
./Main.cpp:39:5: note: previous declaration ‘int fact [114514]’
 int fact[114514];
     ^
./Main.cpp: In function ‘int main()’:
./Main.cpp:50:7: error: ‘f’ was not declared in this scope
     f();
       ^