Submission #61147678


Source Code Expand

Copy
/*
Start:
End:
Time used:
……
…………
DON'T GET STUCK ON ONE APPROACH!!!
*/
#include <bits/stdc++.h>//
#define re register//
#define rep(i,a,b) for (re int i = (a);i <= (b); ++i)
#define debug(x) cout << #x << '=',print(x),putchar(' ')
#define file(x) freopen(x".in","r",stdin),freopen(x".out","w",stdout)
#define pi pair<int,int>
#define mp(a,b) make_pair(a,b)
typedef long long ll;
using namespace std;//
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
/*
Start: 
End: 
Time used: 
「責任を負う人の話は、あなたと話したことがありますよね」 
「当時の私はまだわからないけど……今は理解できるようになった」 
「大人としての責務。そして、その延長線上にある、あなたの選択」 
「それに代表されるアイデアもあります」 
「だから、先生」 
「信じられる大人のあなたなら、この歪んだ変形の終点とは、違う結果……そこにつながる選択肢……きっとあなたは見つけることができます」
DON'T GET STUCK ON ONE APPROACH!!!
*/
#include <bits/stdc++.h>//喵内~
#define re register//喵内~
#define rep(i,a,b) for (re int i = (a);i <= (b); ++i)
#define debug(x) cout << #x << '=',print(x),putchar(' ')
#define file(x) freopen(x".in","r",stdin),freopen(x".out","w",stdout)
#define pi pair<int,int>
#define mp(a,b) make_pair(a,b)
typedef long long ll;
using namespace std;//喵内~
inline ll read(){
    ll s = 0,f = 1;char c = getchar();
    while (!isdigit(c)){if (c == '-')f = -1;c = getchar();}
    while (isdigit(c)){s = (s<<3) + (s<<1) + (c ^ 48);c = getchar();}
    return s * f;
}//喵内~
void print(__int128 x){if (x < 0) {putchar('-'),print(-x);return ;}if (x >= 10) print(x / 10);putchar(x % 10 + 48);}//喵内~
//const int Mod = 1e9 + 7;//喵内~要填数字哟~
const int Mod = 998244353;//喵内~要填数字哟~
const ll INF = 0x3f3f3f3f;
const int N = 2e5 + 5;//喵内~要填数字哟~
ll qpow(ll x,ll y){
   ll res = 1;
    for (;y;y >>= 1,x = x * x % Mod) if (y & 1) res = res * x % Mod;
    return res;
}
int a[5];
signed main(){
    for (int i = 1;i <= 4;++i) a[i] = read();
    sort(a + 1,a + 5);
    if (a[1] == a[2] && a[2] == a[3] && a[3] == a[4]) {puts("No"); return 0;}
    if (a[1] == a[2] && a[2] == a[3]) {puts("Yes"); return 0;}
    if (a[2] == a[3] && a[3] == a[4]) {puts("Yes"); return 0;}
    if (a[1] == a[2] && a[3] == a[4]) {puts("Yes"); return 0;}
    puts("No");
    return 0;
}//喵内~
/*
What's wrong with my code?
1. 小数据?特殊数据?如 n = 1?
2. 最小值,最大值取多少?是否会溢出?
3. 初始值有没有赋值?有没有建树?
4. 数组大小?是否越界?
5. 思考暴力的时候,考虑是否可能是多个连续段?或者是个数不确定无法暴力?
6. 进行详细的分类讨论?
7. 选择的区间是否可以为空?

Trick:
1. 连通 通常带有特殊性质
2. LIS 有另一种求法
3. Brovuka?

About implementation skills:
1. 全局变量多用长变量名,而局部变量,临时变量,和函数传递的参数使用短变量名。
2. 大模拟尽量遵循:怎么方便怎么写。
3. 对于一些数据很小的需要维护的量并且需要大量讨论时,可以考虑把数组拆掉换成变量。
4. 写成多个函数。
*/

Submission Info

Submission Time
Task A - Full House 2
User FlamingBlade
Language C++ 20 (gcc 12.2)
Score 100
Code Size 2926 Byte
Status AC
Exec Time 1 ms
Memory 3564 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 5
AC × 25
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt
All sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt
Case Name Status Exec Time Memory
sample_01.txt AC 1 ms 3376 KB
sample_02.txt AC 1 ms 3512 KB
sample_03.txt AC 1 ms 3440 KB
sample_04.txt AC 1 ms 3440 KB
sample_05.txt AC 1 ms 3452 KB
test_01.txt AC 1 ms 3452 KB
test_02.txt AC 1 ms 3492 KB
test_03.txt AC 1 ms 3452 KB
test_04.txt AC 1 ms 3564 KB
test_05.txt AC 1 ms 3516 KB
test_06.txt AC 1 ms 3504 KB
test_07.txt AC 1 ms 3452 KB
test_08.txt AC 1 ms 3448 KB
test_09.txt AC 1 ms 3444 KB
test_10.txt AC 1 ms 3456 KB
test_11.txt AC 1 ms 3556 KB
test_12.txt AC 1 ms 3440 KB
test_13.txt AC 1 ms 3452 KB
test_14.txt AC 1 ms 3488 KB
test_15.txt AC 1 ms 3492 KB
test_16.txt AC 1 ms 3508 KB
test_17.txt AC 1 ms 3460 KB
test_18.txt AC 1 ms 3460 KB
test_19.txt AC 1 ms 3492 KB
test_20.txt AC 1 ms 3440 KB


2025-03-05 (Wed)
20:49:39 +00:00