标签:scanf freopen stdin -- turn else pre cst std
Code:
#include<cstdio> int main(){ //freopen("input.in","r",stdin); int n,cur,res=0; scanf("%d",&n); for(int i=1;i<=n;++i){ int f; scanf("%d",&f); if(res==0){ cur=f,res=1; } else { if(f==cur) ++res; else --res; } } printf("%d",cur); return 0; }
标签:scanf freopen stdin -- turn else pre cst std
原文地址:https://www.cnblogs.com/guangheli/p/9889963.html