結果
| 問題 |
No.814 ジジ抜き
|
| コンテスト | |
| ユーザー |
Lepton_s
|
| 提出日時 | 2018-02-21 13:21:16 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 634 bytes |
| コンパイル時間 | 637 ms |
| コンパイル使用メモリ | 73,388 KB |
| 最終ジャッジ日時 | 2025-01-05 08:24:02 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 23 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:13:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
13 | scanf("%d",&N);
| ~~~~~^~~~~~~~~
main.cpp:16:24: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
16 | rep(i, N) scanf("%lld%lld%d",&K[i],&L[i],&D[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
// I/O only
#include <cstdio>
#include <iostream>
#include <vector>
typedef long long ll;
#define REP(i,a,b) for(ll (i)=a;(i)<(ll)(b);++(i))
#define rep(i,n) REP(i,0,n)
using namespace std;
int main(){
//std::ios::sync_with_stdio(false);std::cin.tie(0);
int N;
scanf("%d",&N);
vector<ll> K(N), L(N);
vector<int> D(N);
rep(i, N) scanf("%lld%lld%d",&K[i],&L[i],&D[i]);
ll lb = -1, ub = (ll)1e18+10;
/*
while(ub-lb>1){
ll md = (lb+ub+1)/2;
int x = 0;
rep(i, N){
ll t = md-L[i];
if(t<0) continue;
t >>= D[i];
t = min(t, K[i]-1);
if(t%2==0) x = !x;
}
(x==1?ub:lb)=md;
}
*/
cout<<ub<<endl;
return 0;
}
Lepton_s