結果
| 問題 |
No.2344 (l+r)^2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-09 21:07:27 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 466 bytes |
| コンパイル時間 | 480 ms |
| コンパイル使用メモリ | 25,728 KB |
| 実行使用メモリ | 13,640 KB |
| 最終ジャッジ日時 | 2025-01-02 01:49:04 |
| 合計ジャッジ時間 | 14,909 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 TLE * 4 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d", &T);
| ^~~~~~~~~~~~~~~
main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%d %d", &n, &m);
| ^~~~~~~~~~~~~~~~~~~~~~
main.c:12:34: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
12 | for(int i = 0;i < n;i++) scanf("%d", &a[i]);
| ^~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#define ui unsigned int
ui a[200001];
int main() {
int T;
scanf("%d", &T);
for(int x = 0;x < T;x++) {
int n, m;
scanf("%d %d", &n, &m);
for(int i = 0;i < n;i++) scanf("%d", &a[i]);
for(int i = 0;i < n - 1;i++) {
for(int j = 0;j < n - i - 1; j++) {
a[j] += a[j + 1];
a[j] *= a[j];
}
}
printf("%d\n", a[0] & ((1 << m) - 1));
}
}