70分求助,AC必关

P4414 [COCI2006-2007#2] ABC

被我自己蠢哭,怎么能直接在原变量上修改呢 (~~我是蠢蛋~~) 加个x,y,z就行了 ``` cin>>x>>y>>z; sum=x+y+z; a=min(min(x,y),z); c=max(max(x,y),z); b=sum-(a+c); ``` 艹,此帖不删我当一辈子黑历史
by YuYi_official @ 2024-10-13 11:52:32


@[YuYi_official](/user/1457862) ```cpp #include <algorithm> #include <iostream> using namespace std; int a[3]; int main() { for (int i= 0; i < 3; i++) cin >> a[i]; sort(a, a + 3); for (int i = 0; i < 3; i++) { char c; cin >> c; cout << a[c - 'A'] << ' '; } cout << '\n'; } ```
by blue_peace @ 2024-10-13 11:52:36


emm,你变量a已经被替换了啊,所以就wa了
by 天使宝贝 @ 2024-10-13 11:53:36


@[YuYi_official](/user/1457862) ```cpp a=min(min(a,b),c); c=max(max(a,b),c); b=sum-(a+c); ``` 这一段改一下 ``` int x=a,y=b,z=c; a=min(min(x,y),z); c=max(max(x,y),z); b=sum-a-c; ```
by blue_peace @ 2024-10-13 11:54:38


@[YuYi_official](/user/1457862) 啊?你已经改了? ~~亏我打那么久~~
by blue_peace @ 2024-10-13 11:55:40


@[blue_peace](/user/1246468) 因为我很快(?)【doge】
by YuYi_official @ 2024-10-13 11:58:08


@[YuYi_official](/user/1457862) 不是哥们,洛古有防作弊,直接抄题解会被封(好歹改个变量名)
by zhy_aua @ 2024-10-16 22:36:51


|