Submission #946109

# Submission time Handle Problem Language Result Execution time Memory
946109 2024-03-14T10:24:51 Z kokoxuya Fancy Fence (CEOI20_fancyfence) C++14
0 / 100
1 ms 348 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";
	ans *= (temp1 * (temp1 + 1)/2);
	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 0 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 -
# 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 -
# 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 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -