Submission #9634

#TimeUsernameProblemLanguageResultExecution timeMemory
9634pichuliaUniting (kriii2_U)C++98
Compilation error
0 ms0 KiB
#include<stdio.h> #define M 1000000007LL int n; long long int a[100009]; long long int f[100009]; long long int g[100009]; long long int s,t,u; int main() { scanf("%d",&n); long long int i,j, k; f[0] = 1; g[0] = 1; for(i=0;i<n;i++) { scanf("%lld",&a[i]); s = (s+a[i])%M; t = (t+a[i]*a[i])%M; } g[1] = 1; for(i=2;i<=n;i++) { g[i] = (g[i-1]*(i*(i-1)))%M; } u = (s*s-t); u = u/2 printf("%lld\n%lld\n",u,g[n]); }

Compilation message (stderr)

U.cpp: In function 'int main()':
U.cpp:27:2: error: expected ';' before 'printf'
U.cpp:11:18: warning: unused variable 'j' [-Wunused-variable]
U.cpp:11:21: warning: unused variable 'k' [-Wunused-variable]
U.cpp:10:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
U.cpp:16:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]