风趣幽默
赛时发了疯,以为自己做法假了,后来发现忘记判地毯大小为 的情况了,狂吃罚时,唐到没边。
赛时代码和官解差不多,这里解释一些我在草稿纸上自我博弈遇见的问题。
正难则反,由于米利亚非常好赢,所以我们来考虑安安赢的条件。
下设地面长为 宽为 ,地毯长为 宽为 。
以下情况不含:
-
地毯大小为 的情况
-
米利亚一开始放不了地毯的情况
-
米利亚一次就能填满的情况
那么,魔女审判现在开始
【疑问】为什么地毯长边大于 且 牢安又寄了
于是我们不难发现这个游戏实在是大叔戏小姐不公平。
有没有安安能获胜的情况呢?
【反驳】当且仅当 或 时成立
赛时代码超级丑还乱七八糟:
#include<bits/stdc++.h>
#define int long long
#define ll long long
#define ull unsigned long long
#define i128 __int128
#ifdef __linux__
//#define getchar getchar_unlocked
#define putchar putchar_unlocked
#endif
#define CK_TM cerr<<'\n'<<1.0*fabs(&ENDM-&STARTM)/(1024*1024)<<"MB"<<" "<<1.0*clock()/CLOCKS_PER_SEC*1000<<"ms"<<'\n';
//char buf[1<<25],*p1,*p2;
//#define getchar() ((p1==p2)&&(p2=(p1=buf)+fread(buf,1,1<<25,stdin))?EOF:*p1++)
#define vector basic_string
#define pq priority_queue
#define mkpr make_pair
#define pii pair<int,int>
#define pb push_back
#define umap unordered_map
#define uset unordered_set
#define vi vector<int>
#define sz(h) (int)h.size()
#define popc(x) __builtin_popcount(x)
bool STARTM;
constexpr double eps=1e-10;
constexpr int i_inf=1e9;
constexpr ll ll_inf=1e18;
namespace AyanamiRei{
inline int read(){
int x=0,f=1;char c=getchar();
while(c<'0'||c>'9') {if(c=='-') f^=1;c=getchar();}
while(c>='0'&&c<='9') {x=(x<<3)+(x<<1)+(c^48);c=getchar();}
return f?x:~x+1;
}
}namespace SoryuAsukaRangure{
inline void write(int x){
if(x<0) x=~x+1,putchar('-');
if(x>9) write(x/10);
return putchar(x%10^48),void();
}
}namespace AyanamiYue{
inline void spaceput(int x){
SoryuAsukaRangure::write(x);putchar(' ');
}
}namespace IkariYue{
inline void output(int x){
SoryuAsukaRangure::write(x);putchar('\n');
}
}namespace IkariShinji{
inline int max(int x,int y){
return x>y?x:y;
}
}namespace NagisaKaworu{
inline int min(int x,int y){
return x<y?x:y;
}
}namespace MariMakinamiIllustious{
inline double MAX(double x,double y){
return x-y>eps?x:y;
}
}namespace ShikinamiAsukaRangure{
inline double MIN(double x,double y){
return y-x>eps?x:y;
}
}
using namespace std;
using namespace AyanamiRei;
using namespace SoryuAsukaRangure;
using namespace AyanamiYue;
using namespace IkariYue;
using namespace IkariShinji;
using namespace NagisaKaworu;
using namespace MariMakinamiIllustious;
using namespace ShikinamiAsukaRangure;
constexpr int the_birthday_of_Asuka=20011204;
constexpr int the_birthday_of_Ayanami=20010330;
mt19937 Asuka(the_birthday_of_Asuka+time(0));
mt19937 Ayanami(the_birthday_of_Ayanami+time(0));
bool ENDM;
signed main(){
// ios::sync_with_stdio(0);
// cin.tie(0),cout.tie(0);
int T;cin>>T;
while(T--){
int a,b,m,n;cin>>n>>m>>a>>b;
if(n<=m) swap(n,m);
if(a<=b) swap(a,b);
if(n==a&&m==b){
cout<<"An-An"<<'\n';
continue;
}
if(b!=1){
cout<<"Miria"<<'\n';
continue;
}
if(a==1&&b==1){
cout<<"An-An"<<'\n';
continue;
}
if((n*m)%(a*b)!=0||n*m<a*b){
cout<<"Miria"<<'\n';
continue;
}
if(m==2&&a==2){
cout<<"An-An"<<'\n';
continue;
}
if(n==a&&m<=a){
cout<<"An-An"<<'\n';
continue;
}
else{
if(m==a&&n<a+2) cout<<"An-An"<<'\n';
else cout<<"Miria"<<'\n';
}
}
CK_TM;
return 0;
}闲话
有没有人告诉我如果大叔和牢安互换身体之后,牢安能不能用自己的洗脑能力让大叔把自己换回来啊







