为什么80???

P7869 「Wdoi-4」使用三个系统程度的能力

@[zswmb](/user/235901) `if(s[t]==92) return 1;` 是不是要改成 `if(s[t]=='\\') return 1;` 验证码 m888 祭
by ImposterAnYu @ 2021-09-22 22:29:32


@[ImopsterAnYu](/user/510555) 也错了
by Cstdio_Rabbit @ 2021-09-22 22:36:33


$i+2>\text{len}$
by Dantal10n @ 2021-09-22 22:44:09


@[zswmb](/user/235901) 如果你出现 `\r\r` 你会认为是 windows。
by w23c3c3 @ 2021-09-22 22:45:13


同意楼上。你可以直接暴力判断呀! ``` #include<bits/stdc++.h> using namespace std; string s; int main(){ //freopen("system4.in","r",stdin); getline(cin,s); register int ls=s.length(); for(register int i(0);i<=ls;++i){ if(s[i]=='\\'){ if(s[i+1]=='n'){ cout<<"linux"; return 0; } if(s[i+1]=='r'&&s[i+2]=='\\'&&s[i+3]=='n'){ cout<<"windows"; return 0; } if(s[i+1]=='r'){ cout<<"mac"; return 0; } } } return 0; } ```
by Isshiki·Iroha @ 2021-09-23 11:25:24


@[w23c3c3](/user/109942) @[Isshiki·Iroha](/user/414386) 哦哦,谢谢
by Cstdio_Rabbit @ 2021-09-23 13:07:39


|