标签:存在 desc == ted text ble panel flask getch
1 #include<cstdio> 2 int s[1010][1010]; 3 int read() 4 { 5 int x = 0, f = 1;char ch = getchar(); 6 while (ch<‘0‘ || ch>‘9‘) {if (ch==‘-‘) f=-1; ch=getchar();} 7 while (ch>=‘0‘ && ch<=‘9‘) {x = x*10+ch-‘0‘; ch=getchar();} 8 return x*f; 9 } 10 void work(int k,int x,int y,int v) 11 { 12 int ans = 0; 13 if (k==1) 14 for (int i=x; i<=y; ++i) 15 for (int j=1; j<=v; ++j) 16 s[i][j]++; 17 if (k==2) 18 { 19 for (int i=x; i<=y; ++i) 20 for (int j=1; j<=v; ++j) 21 if (s[i][j]!=0) 22 { 23 ans += s[i][j]; 24 s[i][j] = 0; 25 } 26 printf("%d\n",ans); 27 } 28 return ; 29 } 30 int main() 31 { 32 int n,m,a,b,c,d; 33 n = read(); m = read(); 34 for (int i=1; i<=m; ++i) 35 { 36 a = read();b = read();c = read();d = read(); 37 work(a,b,c,d); 38 } 39 return 0; 40 }
标签:存在 desc == ted text ble panel flask getch
原文地址:http://www.cnblogs.com/mjtcn/p/7080942.html