提出 #53345346
ソースコード 拡げる
//....................................<In the name of Allah>...............................//
//.................................<Bismillahir Rahmanir Rahim>...................................//
// Author : Riaj Uddin
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<ll> vl;
typedef vector<vi> v1i;
typedef vector<vl> v1l;
typedef pair<ll, ll> pii;
typedef pair<double, double> pdd;
typedef vector<pii> vii;
typedef vector<pair<ll, ll>> vli;
typedef double p;
typedef map<ll, ll> ck;
#define lower(a, b) lower_bound((a).begin(), (a).end(), b) - (a).begin()
#define mem(a, b) memset(a, b, sizeof(a));
#define sz1 cout
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define infll 0n7f7f7f7f7f7f7f7f
#define fraction(a) \
cout.unsetf(ios::floatfield); \
cout.psolveision(a); \
cout.setf(ios::fined, ios::floatfield);
//////////////////////////////////////////
///////////bit-manipulation///////////////
#define Mb(mask) 63 - __builtin_clzll(mask)
#define Lb(mask) __builtin_ctzll(mask)
#define ONE(mask) __builtin_popkll(mask)
#define CHECK(mask, bit) (mask & (1LL << bit))
#define ON(mask, bit) (mask | (1LL << bit))
#define OFF(mask, bit) (mask & ~(1LL << bit))
#define CHANGE(mask, bit) (mask ^ (1LL << bit))
////////powMod---custom//////
//////////////
ll power(ll x, ll y, ll p)
{
ll tmp = 1;
x = x % p;
while (y > 0)
{
if (y & 1)
tmp = (tmp * x) % p;
y = y >> 1;
x = (x * x) % p;
}
return tmp;
}
/////////////
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
ll tc = 1;
// cin >> tc;
while (tc--)
{
ll n, k;
cin >> n;
vl v(n);
for (int i = 0; i < n; i++)
cin >> v[i];
ll ans = 0;
ll mod = 1e8;
for (int i = 0; i < n; i++)
{
ans += ((v[i] * (n - 1)) % mod);
}
cout << ans + mod;
cout << "\n";
}
return 0;
}
提出情報
| 提出日時 |
|
| 問題 |
C - Sigma Problem |
| ユーザ |
Hridoy_ |
| 言語 |
C++ 20 (gcc 12.2) |
| 得点 |
0 |
| コード長 |
2150 Byte |
| 結果 |
WA |
| 実行時間 |
18 ms |
| メモリ |
5468 KiB |
コンパイルエラー
Main.cpp: In function ‘int main()’:
Main.cpp:74:15: warning: unused variable ‘k’ [-Wunused-variable]
74 | ll n, k;
| ^
ジャッジ結果
| セット名 |
Sample |
All |
| 得点 / 配点 |
0 / 0 |
0 / 300 |
| 結果 |
|
|
| セット名 |
テストケース |
| Sample |
00_sample_01.txt, 00_sample_02.txt |
| All |
00_sample_01.txt, 00_sample_02.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt, 01_test_14.txt, 01_test_15.txt, 01_test_16.txt, 01_test_17.txt, 01_test_18.txt, 01_test_19.txt, 01_test_20.txt |
| ケース名 |
結果 |
実行時間 |
メモリ |
| 00_sample_01.txt |
AC |
1 ms |
3544 KiB |
| 00_sample_02.txt |
AC |
1 ms |
3416 KiB |
| 01_test_01.txt |
WA |
17 ms |
5444 KiB |
| 01_test_02.txt |
WA |
16 ms |
5376 KiB |
| 01_test_03.txt |
WA |
16 ms |
5368 KiB |
| 01_test_04.txt |
WA |
17 ms |
5444 KiB |
| 01_test_05.txt |
WA |
16 ms |
5364 KiB |
| 01_test_06.txt |
WA |
17 ms |
5408 KiB |
| 01_test_07.txt |
WA |
16 ms |
5448 KiB |
| 01_test_08.txt |
WA |
16 ms |
5384 KiB |
| 01_test_09.txt |
WA |
16 ms |
5376 KiB |
| 01_test_10.txt |
WA |
18 ms |
5448 KiB |
| 01_test_11.txt |
WA |
16 ms |
5468 KiB |
| 01_test_12.txt |
WA |
10 ms |
5372 KiB |
| 01_test_13.txt |
WA |
16 ms |
5256 KiB |
| 01_test_14.txt |
WA |
3 ms |
3476 KiB |
| 01_test_15.txt |
WA |
17 ms |
5452 KiB |
| 01_test_16.txt |
WA |
11 ms |
4652 KiB |
| 01_test_17.txt |
WA |
1 ms |
3548 KiB |
| 01_test_18.txt |
WA |
1 ms |
3420 KiB |
| 01_test_19.txt |
WA |
16 ms |
5372 KiB |
| 01_test_20.txt |
WA |
16 ms |
5432 KiB |