Submission #946124

# Submission time Handle Problem Language Result Execution time Memory
946124 2024-03-14T10:37:06 Z kokoxuya Fancy Fence (CEOI20_fancyfence) C++14
15 / 100
56 ms 1616 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define moddy 1000000007

signed main()
{
	int N,temp1,temp2,zong = 0;
	cin >> N;
	
	for (int a = 1; a <= N; a++)
	{
		cin >> temp1;
	}
	temp1 = temp1 % moddy;
	for (int a = 1; a <= N; a++)
	{
		cin >> temp2;
		zong += temp2;
		zong %= moddy;
	}
	
	int ans = (zong + 1) * zong / 2;
	ans %= moddy;
	//cout << "before : " << ans  << "\n";
	//cout <<  temp1 << " and " << (temp1 * (temp1 + 1)/2) << "\n";
	int temp3 = (temp1 * (temp1 + 1)/2);
	temp3 %= moddy;
	ans = ans * temp3;
	cout << (ans % moddy);
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 6 ms 604 KB Output is correct
3 Correct 28 ms 1112 KB Output is correct
4 Correct 54 ms 1616 KB Output is correct
5 Correct 56 ms 1556 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -