ACM-ICPC 2018 焦作赛区网络预赛
A. Magic Mirror
签到水题。
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define INF 0x3f3f3f3f
#define fuck(x) cout<<x<<endl
const int N = 2e5 + 10;
const ll mod = 1e9 + 7;
string a, b;
int main(){
int t;
for(cin >> t; t; t--){
cin >> a;
for(int i = 0; i < a.size(); i++){
if(a[i] >= 'A' && a[i] <= 'Z'){
a[i] += ('a' - 'A');
}
}
if(a == "jessie"){
cout << "Good guy!" << "\n";
}else{
cout << "Dare you say that again?" << "\n";
}
}
return 0;
}
I. Save the Room
只有当长宽高都是奇数时才不可能。
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define INF 0x3f3f3f3f
#define fuck(x) cout<<x<<endl
const int N = 2e5 + 10;
const ll mod = 1e9 + 7;
int main(){
int a, b, c;
while(cin >> a >> b >> c){
if(a&1 && b&1 && c&1){
cout << "No\n";
}else{
cout << "Yes\n";
}
}
return 0;
}