标签:names .com php ret name #define online using 序列
bzoj3016[Usaco2012 Nov]Clumsy Cows
题意:
1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 #define inc(i,j,k) for(int i=j;i<=k;i++) 5 using namespace std; 6 7 char ch; int s,ans; 8 int main(){ 9 ch=getchar(); 10 while(ch!=‘\n‘){ 11 if(ch==‘(‘)s++; if(ch==‘)‘){s--; if(s<0)s+=2,ans++;} ch=getchar(); 12 } 13 ans+=s/2; printf("%d",ans); return 0; 14 }
20161019
bzoj3016[Usaco2012 Nov]Clumsy Cows*
标签:names .com php ret name #define online using 序列
原文地址:http://www.cnblogs.com/YuanZiming/p/5986967.html