結果
問題 |
No.35 タイパー高橋
|
ユーザー |
![]() |
提出日時 | 2017-12-04 15:41:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 5,000 ms |
コード長 | 534 bytes |
コンパイル時間 | 799 ms |
コンパイル使用メモリ | 79,808 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-28 15:11:36 |
合計ジャッジ時間 | 1,419 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <iomanip> #include <cmath> using namespace std; #define diff(x,y) ((x > y) ? (x - y) : (y - x)) int main() { int can = 0, cant = 0; int n, msec; string str; cin >> n; for (int i = 0; i < n; i++) { cin >> msec >> str; if (msec > str.size() * 1000.0 / 12)can += str.size(); else { while (msec < str.size() * 1000.0 / 12) { str.erase(str.begin()); cant++; } can += str.size(); } } cout << can << " " << cant << endl; }