ATCODER, started on beginner contest 249
This commit is contained in:
33
atcoder/beginner_contests/249/a.cpp
Normal file
33
atcoder/beginner_contests/249/a.cpp
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
ios::sync_with_stdio(0);
|
||||||
|
cin.tie(0);
|
||||||
|
|
||||||
|
int a, b, c, d, e, f, x;
|
||||||
|
cin >> a >> b >> c >> d >> e >> f >> x;
|
||||||
|
|
||||||
|
int t_loops = x / (a + c);
|
||||||
|
int a_loops = x / (d + f);
|
||||||
|
|
||||||
|
int t_rest = x - t_loops * (a + c);
|
||||||
|
int a_rest = x - a_loops * (d + f);
|
||||||
|
|
||||||
|
int taka = t_loops * b * a + b * min(t_rest, a);
|
||||||
|
int aoki = a_loops * e * d + e * min(a_rest, d);
|
||||||
|
|
||||||
|
if(taka > aoki){
|
||||||
|
cout << "Takahashi" << endl;
|
||||||
|
} else if(aoki > taka){
|
||||||
|
cout << "Aoki" << endl;
|
||||||
|
} else{
|
||||||
|
cout << "Draw" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << flush;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
40
atcoder/beginner_contests/249/b.cpp
Normal file
40
atcoder/beginner_contests/249/b.cpp
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
ios::sync_with_stdio(0);
|
||||||
|
cin.tie(0);
|
||||||
|
|
||||||
|
string s;
|
||||||
|
cin >> s;
|
||||||
|
|
||||||
|
set<char> seen;
|
||||||
|
bool lower = false, upper = false;
|
||||||
|
|
||||||
|
for(char c : s){
|
||||||
|
if(isupper(c)){
|
||||||
|
upper = true;
|
||||||
|
}
|
||||||
|
else if(islower(c)){
|
||||||
|
lower = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(seen.count(c)){
|
||||||
|
cout << "No" << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
seen.insert(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(lower && upper){
|
||||||
|
cout << "Yes" << endl;
|
||||||
|
} else{
|
||||||
|
cout << "No" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << flush;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
19
atcoder/beginner_contests/249/c.cpp
Normal file
19
atcoder/beginner_contests/249/c.cpp
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
ios::sync_with_stdio(0);
|
||||||
|
cin.tie(0);
|
||||||
|
|
||||||
|
int n, k;
|
||||||
|
|
||||||
|
cin >> n >> k;
|
||||||
|
|
||||||
|
vector<map<char, int>> s;
|
||||||
|
|
||||||
|
cout << flush;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
25
atcoder/beginner_contests/249/d.cpp
Normal file
25
atcoder/beginner_contests/249/d.cpp
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
void test_case(int tc){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
ios::sync_with_stdio(0);
|
||||||
|
cin.tie(0);
|
||||||
|
|
||||||
|
int t;
|
||||||
|
cin >> t;
|
||||||
|
|
||||||
|
for(int tc = 1; tc <= t; ++tc){
|
||||||
|
test_case(tc);
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << flush;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
25
atcoder/beginner_contests/249/e.cpp
Normal file
25
atcoder/beginner_contests/249/e.cpp
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
void test_case(int tc){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
ios::sync_with_stdio(0);
|
||||||
|
cin.tie(0);
|
||||||
|
|
||||||
|
int t;
|
||||||
|
cin >> t;
|
||||||
|
|
||||||
|
for(int tc = 1; tc <= t; ++tc){
|
||||||
|
test_case(tc);
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << flush;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
25
atcoder/beginner_contests/249/ex.cpp
Normal file
25
atcoder/beginner_contests/249/ex.cpp
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
void test_case(int tc){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
ios::sync_with_stdio(0);
|
||||||
|
cin.tie(0);
|
||||||
|
|
||||||
|
int t;
|
||||||
|
cin >> t;
|
||||||
|
|
||||||
|
for(int tc = 1; tc <= t; ++tc){
|
||||||
|
test_case(tc);
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << flush;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
25
atcoder/beginner_contests/249/f.cpp
Normal file
25
atcoder/beginner_contests/249/f.cpp
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
void test_case(int tc){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
ios::sync_with_stdio(0);
|
||||||
|
cin.tie(0);
|
||||||
|
|
||||||
|
int t;
|
||||||
|
cin >> t;
|
||||||
|
|
||||||
|
for(int tc = 1; tc <= t; ++tc){
|
||||||
|
test_case(tc);
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << flush;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
25
atcoder/beginner_contests/249/g.cpp
Normal file
25
atcoder/beginner_contests/249/g.cpp
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
void test_case(int tc){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
ios::sync_with_stdio(0);
|
||||||
|
cin.tie(0);
|
||||||
|
|
||||||
|
int t;
|
||||||
|
cin >> t;
|
||||||
|
|
||||||
|
for(int tc = 1; tc <= t; ++tc){
|
||||||
|
test_case(tc);
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << flush;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user