Submission #444973

# Submission time Handle Problem Language Result Execution time Memory
444973 2021-07-16T07:02:33 Z fuad27 Fancy Fence (CEOI20_fancyfence) C++14
0 / 100
1 ms 204 KB
#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
int main () {
	long long n, a = 0;
	cin >> n;
	long long sumW = 0, r = 0;
	for(int i = 0;i<n;i++) {
		long long W;
		cin >> W;
		a = W;
	}
	for(int i = 0;i<n;i++) {
		long long p;
		cin >> p;
		sumW += p;
		sumW%=mod;
	}
	a%=mod;
	sumW%=mod;
	a*=(a+1);
	a%=mod;
	sumW*=(sumW+1);
	sumW%=mod;
	cout<<(a/2)*(sumW/2)<<endl;
}

Compilation message

fancyfence.cpp: In function 'int main()':
fancyfence.cpp:7:22: warning: unused variable 'r' [-Wunused-variable]
    7 |  long long sumW = 0, r = 0;
      |                      ^
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -