0_0_39600788_5881.cpp:5:53: error: 'sum' does not name a type
5 | long long const int N=101000;const int mod=1e9+7;ll sum[N],mul[N];ll fst(ll x,ll n){ll res=1;x=x%mod;while(n){if(n&1) res=res*x%mod;x=x*x%mod;n>>=1;}return res;}ll modd(ll a,ll b){return fst(a,b-2);}signed main(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int T;cin>>T;sum[1]=0;mul[1]=1;for(int i=2;i<=N;i++){sum[i]=sum[i-1]+i;mul[i]=(mul[i-1]*i)%mod;}while(T--){int x;cin>>x;if(x==1){cout<<1<<"\n";continue;}ll k=upper_bound(sum+1,sum+N+1,x)-sum-1;ll m=x-sum[k];ll ans;if(k==m) ans=mul[k]*(modd(2,mod)%mod)*(k+2)%mod;else ans=mul[k+1]*(modd(k-m+1,mod)%mod)%mod;cout<<ans<<"\n";}return 0;}
| ^~~
0_0_39600788_5881.cpp:5:73: error: expected constructor, destructor, or type conversion before '(' token
5 | long long const int N=101000;const int mod=1e9+7;ll sum[N],mul[N];ll fst(ll x,ll n){ll res=1;x=x%mod;while(n){if(n&1) res=res*x%mod;x=x*x%mod;n>>=1;}return res;}ll modd(ll a,ll b){return fst(a,b-2);}signed main(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int T;cin>>T;sum[1]=0;mul[1]=1;for(int i=2;i<=N;i++){sum[i]=sum[i-1]+i;mul[i]=(mul[i-1]*i)%mod;}while(T--){int x;cin>>x;if(x==1){cout<<1<<"\n";continue;}ll k=upper_bound(sum+1,sum+N+1,x)-sum-1;ll m=x-sum[k];ll ans;if(k==m) ans=mul[k]*(modd(2,mod)%mod)*(k+2)%mod;else ans=mul[k+1]*(modd(k-m+1,mod)%mod)%mod;cout<<ans<<"\n";}return 0;}
| ^
0_0_39600788_5881.cpp:5:169: error: expected constructor, destructor, or type conversion before '(' token
5 | long long const int N=101000;const int mod=1e9+7;ll sum[N],mul[N];ll fst(ll x,ll n){ll res=1;x=x%mod;while(n){if(n&1) res=res*x%mod;x=x*x%mod;n>>=1;}return res;}ll modd(ll a,ll b){return fst(a,b-2);}signed main(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int T;cin>>T;sum[1]=0;mul[1]=1;for(int i=2;i<=N;i++){sum[i]=sum[i-1]+i;mul[i]=(mul[i-1]*i)%mod;}while(T--){int x;cin>>x;if(x==1){cout<<1<<"\n";continue;}ll k=upper_bound(sum+1,sum+N+1,x)-sum-1;ll m=x-sum[k];ll ans;if(k==m) ans=mul[k]*(modd(2,mod)%mod)*(k+2)%mod;else ans=mul[k+1]*(modd(k-m+1,mod)%mod)%mod;cout<<ans<<"\n";}return 0;}
| ^
0_0_39600788_5881.cpp: In function 'int main()':
0_0_39600788_5881.cpp:5:274: error: 'sum' was not declared in this scope
5 | long long const int N=101000;const int mod=1e9+7;ll sum[N],mul[N];ll fst(ll x,ll n){ll res=1;x=x%mod;while(n){if(n&1) res=res*x%mod;x=x*x%mod;n>>=1;}return res;}ll modd(ll a,ll b){return fst(a,b-2);}signed main(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int T;cin>>T;sum[1]=0;mul[1]=1;for(int i=2;i<=N;i++){sum[i]=sum[i-1]+i;mul[i]=(mul[i-1]*i)%mod;}while(T--){int x;cin>>x;if(x==1){cout<<1<<"\n";continue;}ll k=upper_bound(sum+1,sum+N+1,x)-sum-1;ll m=x-sum[k];ll ans;if(k==m) ans=mul[k]*(modd(2,mod)%mod)*(k+2)%mod;else ans=mul[k+1]*(modd(k-m+1,mod)%mod)%mod;cout<<ans<<"\n";}return 0;}
| ^~~
0_0_39600788_5881.cpp:5:283: error: 'mul' was not declared in this scope
5 | long long const int N=101000;const int mod=1e9+7;ll sum[N],mul[N];ll fst(ll x,ll n){ll res=1;x=x%mod;while(n){if(n&1) res=res*x%mod;x=x*x%mod;n>>=1;}return res;}ll modd(ll a,ll b){return fst(a,b-2);}signed main(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int T;cin>>T;sum[1]=0;mul[1]=1;for(int i=2;i<=N;i++){sum[i]=sum[i-1]+i;mul[i]=(mul[i-1]*i)%mod;}while(T--){int x;cin>>x;if(x==1){cout<<1<<"\n";continue;}ll k=upper_bound(sum+1,sum+N+1,x)-sum-1;ll m=x-sum[k];ll ans;if(k==m) ans=mul[k]*(modd(2,mod)%mod)*(k+2)%mod;else ans=mul[k+1]*(modd(k-m+1,mod)%mod)%mod;cout<<ans<<"\n";}return 0;}
| ^~~
0_0_39600788_5881.cpp:5:417: error: 'k' was not declared in this scope
5 | long long const int N=101000;const int mod=1e9+7;ll sum[N],mul[N];ll fst(ll x,ll n){ll res=1;x=x%mod;while(n){if(n&1) res=res*x%mod;x=x*x%mod;n>>=1;}return res;}ll modd(ll a,ll b){return fst(a,b-2);}signed main(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int T;cin>>T;sum[1]=0;mul[1]=1;for(int i=2;i<=N;i++){sum[i]=sum[i-1]+i;mul[i]=(mul[i-1]*i)%mod;}while(T--){int x;cin>>x;if(x==1){cout<<1<<"\n";continue;}ll k=upper_bound(sum+1,sum+N+1,x)-sum-1;ll m=x-sum[k];ll ans;if(k==m) ans=mul[k]*(modd(2,mod)%mod)*(k+2)%mod;else ans=mul[k+1]*(modd(k-m+1,mod)%mod)%mod;cout<<ans<<"\n";}return 0;}
| ^
0_0_39600788_5881.cpp:5:457: error: 'm' was not declared in this scope
5 | long long const int N=101000;const int mod=1e9+7;ll sum[N],mul[N];ll fst(ll x,ll n){ll res=1;x=x%mod;while(n){if(n&1) res=res*x%mod;x=x*x%mod;n>>=1;}return res;}ll modd(ll a,ll b){return fst(a,b-2);}signed main(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int T;cin>>T;sum[1]=0;mul[1]=1;for(int i=2;i<=N;i++){sum[i]=sum[i-1]+i;mul[i]=(mul[i-1]*i)%mod;}while(T--){int x;cin>>x;if(x==1){cout<<1<<"\n";continue;}ll k=upper_bound(sum+1,sum+N+1,x)-sum-1;ll m=x-sum[k];ll ans;if(k==m) ans=mul[k]*(modd(2,mod)%mod)*(k+2)%mod;else ans=mul[k+1]*(modd(k-m+1,mod)%mod)%mod;cout<<ans<<"\n";}return 0;}
| ^
0_0_39600788_5881.cpp:5:471: error: 'ans' was not declared in this scope; did you mean 'abs'?
5 | long long const int N=101000;const int mod=1e9+7;ll sum[N],mul[N];ll fst(ll x,ll n){ll res=1;x=x%mod;while(n){if(n&1) res=res*x%mod;x=x*x%mod;n>>=1;}return res;}ll modd(ll a,ll b){return fst(a,b-2);}signed main(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int T;cin>>T;sum[1]=0;mul[1]=1;for(int i=2;i<=N;i++){sum[i]=sum[i-1]+i;mul[i]=(mul[i-1]*i)%mod;}while(T--){int x;cin>>x;if(x==1){cout<<1<<"\n";continue;}ll k=upper_bound(sum+1,sum+N+1,x)-sum-1;ll m=x-sum[k];ll ans;if(k==m) ans=mul[k]*(modd(2,mod)%mod)*(k+2)%mod;else ans=mul[k+1]*(modd(k-m+1,mod)%mod)%mod;cout<<ans<<"\n";}return 0;}
| ^~~
| abs
0_0_39600788_5881.cpp:5:496: error: 'modd' was not declared in this scope; did you mean 'modf'?
5 | long long const int N=101000;const int mod=1e9+7;ll sum[N],mul[N];ll fst(ll x,ll n){ll res=1;x=x%mod;while(n){if(n&1) res=res*x%mod;x=x*x%mod;n>>=1;}return res;}ll modd(ll a,ll b){return fst(a,b-2);}signed main(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int T;cin>>T;sum[1]=0;mul[1]=1;for(int i=2;i<=N;i++){sum[i]=sum[i-1]+i;mul[i]=(mul[i-1]*i)%mod;}while(T--){int x;cin>>x;if(x==1){cout<<1<<"\n";continue;}ll k=upper_bound(sum+1,sum+N+1,x)-sum-1;ll m=x-sum[k];ll ans;if(k==m) ans=mul[k]*(modd(2,mod)%mod)*(k+2)%mod;else ans=mul[k+1]*(modd(k-m+1,mod)%mod)%mod;cout<<ans<<"\n";}return 0;}
| ^~~~
| modf
0_0_39600788_5881.cpp:5:542: error: 'modd' was not declared in this scope; did you mean 'modf'?
5 | long long const int N=101000;const int mod=1e9+7;ll sum
|