結果

問題 No.2344 (l+r)^2
ユーザー noiminoimi
提出日時 2023-06-09 21:07:27
言語 C
(gcc 12.3.0)
結果
TLE  
実行時間 -
コード長 466 bytes
コンパイル時間 712 ms
コンパイル使用メモリ 28,836 KB
実行使用メモリ 8,752 KB
最終ジャッジ日時 2023-08-30 12:38:54
合計ジャッジ時間 7,633 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 71 ms
4,380 KB
testcase_02 AC 16 ms
4,376 KB
testcase_03 AC 15 ms
4,376 KB
testcase_04 AC 15 ms
4,380 KB
testcase_05 AC 16 ms
4,380 KB
testcase_06 AC 15 ms
4,376 KB
testcase_07 TLE -
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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));
    }
}
0