結果
| 問題 |
No.9000 Hello World! (テスト用)
|
| ユーザー |
|
| 提出日時 | 2022-09-11 22:06:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 4,617 bytes |
| コンパイル時間 | 2,000 ms |
| コンパイル使用メモリ | 193,468 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-28 14:26:47 |
| 合計ジャッジ時間 | 2,410 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
#include"bits/stdc++.h"
#include<set>
#include<map>
using namespace std;
typedef long long int ll;
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define loop(i,a,n) for(int i = a; i < n; ++ i)
#define rep(i,a,n) for(int i = a; i < =n; ++ i);
//#define for(i,a,b) for(int i=(a);i<(b);++i)
//#define rep(i,a,b) for(int =i;i<=(b);++i)
#define trav(a, x) for (auto &a : (x))
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
int mod=1e9+7;
void local()
{
#ifndef ONLINE_JUDGE
freopen("/Users/vaibhav/Documents/code /input.txt", "r",stdin);
freopen("/Users/vaibhav/Documents/code /output.txt", "w", stdout);
#endif
}
// first we have to evaluate the
// distance from the top to the bottom consodering 1 as the tree node;
int n,m,t;
vector<int>dep;
map<int,vector<pair<int,int>>>adj;
void evaldepth(int src,int par){
for(auto child:adj[src]){
if(child.first!=par){
evaldepth(child.first,src);
dep[src]=max(dep[src],child.second
+dep[child.first]);
}
}
}
// vector<int>ans(10);
// void solve(int st,int par,int part){
// vector<int>prefix,suffix;
// for(auto child :adj[st]){
// if(child.first!=par){
// prefix.push_back(dep[child.first]);
// suffix.push_back(dep[child.first]);
// }
// // building the prefix and suffix array
// for(int i=1; i<(int)prefix.size(); i++){
// prefix[i]=max(prefix[i-1],prefix[i]);
// }
// for(int i=(int)suffix.size()-2; i>=0;i--){
// suffix[i]=max(suffix[i],suffix[i+1]);
// }
// }
// debug(prefix);
// debug(suffix);
// int childrens=0;
// for(auto child:adj[st])
// {
// if(child.first!=par){
// int op1=(childrens==0)?INT_MIN:prefix[childrens-1];
// int op2=(childrens==0)?INT_MIN:suffix[childrens-1];
// int parti=child.second+max(part,max(op1,op2));
// solve(child.first,st,parti);
// childrens++;
// }
// }
// ans[st]=1+max(part,(prefix.empty()?-1:prefix.back()));
// }
bool dis(string s){
set<int>st;
for(auto i:s){
st.insert(i);
}
if(st.size()==s.size()){
cout<<s<<endl;
return false;
}
return true;
}
int find_dif(vector<int>&a)
{ int maxi=0;
for(int i=0; i<a.size()-1; i++){
maxi=max(maxi,a[i+1]-a[i]);
}
return maxi;
}
int get_ans(int p,int t){
int k=3*p;
k/=10;
int e=p-(p*t/250);
return max(e,k);
}
void solve()
{
char trump;
cin >> trump;
string c1, c2;
cin >> c1 >> c2;
unordered_map<char, ll> val({
{'6', 0},
{'7', 1},
{'8', 2},
{'9', 3},
{'T', 4},
{'J', 5},
{'Q', 6},
{'K', 7},
{'A', 8},
});
if (c1[1] == trump && c2[1] != trump)
cout
<< "YES\n";
else if (c1[1] != trump && c2[1] == trump)
cout
<< "NO\n";
else if (c1[1] == c2[1])
{
if (val[c1[0]] > val[c2[0]])
cout << "YES\n";
else
cout << "NO\n";
}
else
cout << "NO\n";
}
int removezero(long long n){
string s=to_string(n);
string a="";
for(char c:s){
if(c!='0'){
a+=c;
}
}
return stoi(a);
}
ll po(ll n,ll k){
ll c=0;
while(n!=0){
c++;
n=n/k;
}
return c-1;
}
//vector<int>cost;
//partial ans = maxprefix( from 1 to i-1),max suffix i+1 to k/// andans with 1+dep of pare
int main() {
local();
cout<<"Hello World!";
}