結果

問題 No.2344 (l+r)^2
ユーザー keisuke6keisuke6
提出日時 2023-06-07 22:20:34
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 392 bytes
コンパイル時間 2,651 ms
コンパイル使用メモリ 204,392 KB
実行使用メモリ 8,284 KB
最終ジャッジ日時 2023-08-28 18:54:50
合計ジャッジ時間 9,974 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#pragma GCC target("avx2")
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  ios::sync_with_stdio(false);
  std::cin.tie(0);
  int T;
  cin>>T;
  while(T--){
  	int N,M;
  	cin>>N>>M;
  	vector<int> A(N);
  	for(int i=0;i<N;i++) cin>>A[i];
  	for(int i=2;i<=N;i++)for(int j=0;i+j<=N;j++) A[j] = (A[j]+A[j+1])*(A[j]+A[j+1])%(1<<M);
  	cout<<A[0]<<endl;
  }
}
0