結果
問題 |
No.1229 ラグビーの得点パターン
|
ユーザー |
|
提出日時 | 2020-09-18 22:55:42 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 279 bytes |
コンパイル時間 | 1,879 ms |
コンパイル使用メモリ | 166,436 KB |
実行使用メモリ | 17,088 KB |
最終ジャッジ日時 | 2024-06-22 10:14:17 |
合計ジャッジ時間 | 8,419 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 1 -- * 3 |
other | -- * 25 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:9:16: warning: 't' is used uninitialized [-Wuninitialized] 9 | for(int i=0;i<=t;i++){ | ~^~~ main.cpp:5:9: note: 't' was declared here 5 | int n,t,g,pg; | ^ main.cpp:10:18: warning: 'g' may be used uninitialized [-Wmaybe-uninitialized] 10 | for(int j=0;j<g;j++){ | ~^~ main.cpp:5:11: note: 'g' was declared here 5 | int n,t,g,pg; | ^ main.cpp:11:20: warning: 'pg' may be used uninitialized [-Wmaybe-uninitialized] 11 | for(int k=0;k<=pg;g++){ | ~^~~~ main.cpp:5:13: note: 'pg' was declared here 5 | int n,t,g,pg; | ^~
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n,t,g,pg; cin>>n; int cnt=0; for(int i=0;i<=t;i++){ for(int j=0;j<g;j++){ for(int k=0;k<=pg;g++){ if(5*t + 2*g + 3*pg==n && g<=t) cnt++; } } } cout<<cnt<<endl; return 0; }