津津是怎么让它RE的

P1534 不高兴的津津(升级版)

发现问题... 最后一个点只有一个零... 我把第一个循环拆了... $\mathrm{read()}$ 就痞了... $\color{white}\text{验证码BtRs}$
by PBCWZCC @ 2018-07-05 10:09:18


改完后:$\color{white}\mathsf\colorbox{limegreen}{Accepted}$
by PBCWZCC @ 2018-07-05 10:11:27


```cpp #include<cstdio> #include<cctype> using namespace std; int n; int t1,t2,hp,ha;//BEKAZ?? 'Cuz I'm HAPPY! inline int read(void) { int re(0); int symbol(0); register int ch(getchar()); while(!isdigit(ch)) { (ch=='-')?(symbol=1,ch = getchar()):ch=getchar(); } while(isdigit(ch)) { re = (re<<3) + (re<<1) + (ch^48),ch = getchar(); } return symbol?-re:re; } int main() { n = read(); if(n==0) return printf("0")&0; t1 = read(),t2 = read(); t1+=t2; hp = t1-8; ha+=hp; while(--n>0) { t1 = read(),t2 = read(),t1+=t2,hp+=t1-8,ha+=hp; // hp+=t1-8; } return printf("%d",ha)&0; } ```
by PBCWZCC @ 2018-07-05 10:11:52


|