結果
| 問題 | No.568 じゃんじゃん 落とす 委員会 |
| コンテスト | |
| ユーザー |
WA_TLE
|
| 提出日時 | 2017-08-17 18:27:55 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,483 bytes |
| コンパイル時間 | 1,123 ms |
| コンパイル使用メモリ | 120,900 KB |
| 最終ジャッジ日時 | 2025-01-05 02:22:26 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 13 |
ソースコード
#include<string>
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<chrono>
#include<functional>
#include<iterator>
#include<random>
#include<unordered_set>
#include<array>
#include<map>
using namespace std;
typedef long long int llint;
#define mp make_pair
#define mt make_tuple
#define pub push_back
#define puf push_front
#define pob pop_back
#define pof pop_front
#define fir first
#define sec second
#define res resize
#define ins insert
#define era erase
const int mod=1000000007;
const int big=1e9+10;
const long double pai=3.141592653589793238462643383279502884197;
const long double eps=1e-9;
template <class T,class U>bool mineq(T& a,U b){if(a>b){a=b;return true;}return false;}
template <class T,class U>bool maxeq(T& a,U b){if(a<b){a=b;return true;}return false;}
llint gcd(llint a,llint b){if(a%b==0){return b;}else return gcd(b,a%b);}
llint lcm(llint a,llint b){return a/gcd(a,b)*b;}
/*
*/
const int maxsei=100001;
int main(void){
int i,n,m,A,B,ans=big;cin>>n>>m;
//想定解確認用の愚直
if(n>1000){return 0;}
vector<int>x(n);
vector<int>a(n);
vector<int>b(n);
for(i=0;i<n;i++){cin>>x[i]>>a[i]>>b[i];}
for(A=0;A<=100;A++){
for(B=0;B<=100;B++){
int ni=0,san=0;
for(i=0;i<n;i++){
int X=x[i];
if(a[i]>=A){X++;}
if(b[i]>=B){X++;}
if(X>=2){ni++;}
if(X>=3){san++;}
}
if(m<=ni&&ans>san){ans=san;}
}
}
cout<<ans<<endl;
return 0;
}
WA_TLE