結果
| 問題 |
No.73 helloworld
|
| コンテスト | |
| ユーザー |
matsukin1111
|
| 提出日時 | 2019-04-16 15:13:20 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 1,229 bytes |
| コンパイル時間 | 787 ms |
| コンパイル使用メモリ | 94,968 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-01 23:07:50 |
| 合計ジャッジ時間 | 1,395 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:64:74: warning: 'numd' may be used uninitialized [-Wmaybe-uninitialized]
64 | cout << numh * nume* nl * (numo / 2)*(numo - numo / 2)*numw*numr*numd << endl;
| ^~~~
main.cpp:37:48: note: 'numd' was declared here
37 | ll numh, nume, numl, numo, numw, numr, numd;
| ^~~~
main.cpp:64:68: warning: 'numr' may be used uninitialized [-Wmaybe-uninitialized]
64 | cout << numh * nume* nl * (numo / 2)*(numo - numo / 2)*numw*numr*numd << endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.cpp:37:42: note: 'numr' was declared here
37 | ll numh, nume, numl, numo, numw, numr, numd;
| ^~~~
main.cpp:64:63: warning: 'numw' may be used uninitialized [-Wmaybe-uninitialized]
64 | cout << numh * nume* nl * (numo / 2)*(numo - numo / 2)*numw*numr*numd << endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.cpp:37:36: note: 'numw' was declared here
37 | ll numh, nume, numl, numo, numw, numr, numd;
| ^~~~
main.cpp:37:30: warning: 'numo' may be used uninitialized [-Wmaybe-uninitialized]
37 | ll numh, nume, numl, numo, numw, numr, numd;
| ^~~~
main.cpp:60:26: warning: 'numl' may be used uninitialized [-Wmaybe-uninitialized]
60 | for (ll l = 2; l <= numl - 1; l++) {
| ~~^~~~~~~~~~~
main.cpp:37:24: note: 'numl' was declared here
37 | ll numh, nume, numl, numo, numw, numr, numd;
| ^~~~
main.cpp:64:22: warning: 'nume' may be used uninitialized [-Wmaybe-uninitialized]
64 | cout << numh * nume* nl * (numo / 2)*(numo - numo / 2)*numw*numr*numd << endl;
|
ソースコード
#include<iostream>
#include<cstdio>
#include<cstring>
#include <cstdlib>
#include <cmath>
#include<cctype>
#include<string>
#include<set>
#include<iomanip>
#include <map>
#include<algorithm>
#include <functional>
#include<vector>
#include<climits>
#include<stack>
#include<queue>
#include <deque>
#include <climits>
#include <typeinfo>
#include <utility>
#define all(x) (x).begin(),(x).end()
#define rep(i,m,n) for(int i = m;i < n;++i)
#define pb push_back
#define fore(i,a) for(auto &i:a)
#define rrep(i,m,n) for(int i = m;i >= n;--i)
#define INF INT_MAX/2
using namespace std;
using ll = long long;
using R = double;
using Data = pair<ll, vector<int>>;
const ll MOD = 1e9 + 7;
const ll inf = 1LL << 50;
struct edge { ll from; ll to; ll cost; };
int main() {
ll numh, nume, numl, numo, numw, numr, numd;
rep(i, 0, 26) {
ll c;
cin >> c;
switch (i) {
case 3:
numd = c;
case 4:
nume = c;
case 7:
numh = c;
case 11:
numl = c;
case 14:
numo = c;
case 17:
numr = c;
case 22:
numw = c;
}
}
ll nl = 0;
for (ll l = 2; l <= numl - 1; l++) {
nl = max(nl, l*(l - 1)*(numl - l) / 2);
}
cout << numh * nume* nl * (numo / 2)*(numo - numo / 2)*numw*numr*numd << endl;
return 0;
}
matsukin1111