Water problem codeforces Round #308 (Div. 2) A. Vanya and Table

Source: Internet
Author: User

Topic Portal

1 /*2 water Problem: Read the topic can do3 */4#include <cstdio>5#include <iostream>6#include <algorithm>7#include <cstring>8#include <cmath>9#include <vector>Ten#include <string> One#include <queue> A#include <map> -#include <Set> - using namespacestd; the  - Const intMAXN = 1e2 +Ten; - Const intINF =0x3f3f3f3f; - intA[MAXN][MAXN]; +  - intMainvoid)//codeforces Round #308 (Div. 2) A. Vanya and Table + { A     //freopen ("a.in", "R", stdin); at  -     intN; -      while(SCANF ("%d", &n) = =1) -     { -Memset (A,0,sizeof(a)); -         intx1, y1, x2, y2; in          while(n--) -         { toscanf ("%d%d%d%d", &x1, &y1, &AMP;X2, &y2); +              for(intI=y1; i<=y2; ++i) -             { the                  for(intj=x1; j<=x2; ++j) *                 { $a[i][j]++;Panax Notoginseng                 } -             } the         } +         intAns =0; A          for(intI=1; i<= -; ++i) the         { +              for(intj=1; j<= -; ++j) ans + =A[i][j]; -         } $  $printf ("%d\n", ans); -     } -  the  -     return 0;Wuyi}

Water problem codeforces Round #308 (Div. 2) A. Vanya and Table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.