답안 #428222

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
428222 2021-06-15T08:54:19 Z 장태환(#7562) Posters on the wall (CPSPC17_posters) C++17
10 / 100
13 ms 1228 KB
#include <iostream>
using namespace std;
int cou[501][501];
int main()
{
    int a,b,N,M,e;
    cin >> a >> b >> N >> M >> e;
    int i;
    for(i=0;i<N;i++)
    {
        int a,b,c,d;
        cin >> a >> b >> c >> d;
        if(a>c)
            swap(a,c);
        if(b>d)
            swap(b,d);
        int j,k;
        for(j=a;j<c;j++)
        {
            for(k=b;k<d;k++)
                cou[j][k]=1;
        }
    }
    for(i=0;i<M;i++)
    {
        int a,b,c,d,e;
        cin >> a >> b >> c >> d>>e;
        if(a>c)
            swap(a,c);
        if(b>d)
            swap(b,d);
        int j,k;
        int ans=0;
        for(j=a;j<c;j++)
        {
            for(k=b;k<d;k++)
                ans+=cou[j][k];
        }
        cout << ans<<'\n';
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 1100 KB Output is correct
2 Correct 9 ms 1100 KB Output is correct
3 Correct 13 ms 1228 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 1100 KB Output is correct
2 Correct 9 ms 1100 KB Output is correct
3 Correct 13 ms 1228 KB Output is correct
4 Runtime error 1 ms 332 KB Execution killed with signal 11
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 1100 KB Output is correct
2 Correct 9 ms 1100 KB Output is correct
3 Correct 13 ms 1228 KB Output is correct
4 Runtime error 1 ms 332 KB Execution killed with signal 11
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 1100 KB Output is correct
2 Correct 9 ms 1100 KB Output is correct
3 Correct 13 ms 1228 KB Output is correct
4 Runtime error 1 ms 332 KB Execution killed with signal 11
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 1100 KB Output is correct
2 Correct 9 ms 1100 KB Output is correct
3 Correct 13 ms 1228 KB Output is correct
4 Runtime error 1 ms 332 KB Execution killed with signal 11
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -