标签:name style class color lse bsp std names turn
1 #include <iostream> 2 #include <algorithm> 3 #include <set> 4 using namespace std; 5 6 bool vis[105][105]{false}; 7 int main() 8 { 9 ios::sync_with_stdio(false); 10 cin.tie(0); 11 int n; 12 cin >> n; 13 int x1, y1, x2, y2, s = 0; 14 for (int i = 1; i <= n; i++) { 15 cin >> x1 >> y1 >> x2 >> y2; 16 for (int x = x1; x < x2; x++) { 17 for (int y = y1; y < y2; y++) { 18 if (!vis[x][y]) { 19 s++; 20 vis[x][y] = true; 21 } 22 } 23 } 24 } 25 cout << s << endl; 26 return 0; 27 }
标签:name style class color lse bsp std names turn
原文地址:https://www.cnblogs.com/AntonLiu/p/11163726.html