답안 #252392

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
252392 2020-07-25T12:45:10 Z Sugardorj 가로등 (APIO19_street_lamps) C++14
20 / 100
1819 ms 524292 KB
#include <bits/stdc++.h>
using namespace std;
int b[223567],c[223456],a[223456],tt,d[234564];
int x,m,n,t,k,l;
int i , j,r,s,v=234560,y,z;
string p[12345],q;
int main(){
    cin>> n>>m>>p[0];
    for (i = 1; i <=m; i ++){
        cin >> q;
        p[i]=p[i-1];
        if (q[0]=='t'){
            cin >>x;
            x--;
            if (p[i][x]=='1')
                p[i][x]='0';
            else p[i][x]='1';
        }
        else {
            cin >>x>>y;
            x--;
            y--;
            s=0;
            for (k = 0; k<i; k ++){
                t=1;
                for (j = x; j<y; j ++){
                    if (p[k][j]=='0')
                        t=0;
                }
                s+=t;
            }
            cout << s<<endl;
        }
        //cout << p[i]<<endl;
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 768 KB Output is correct
2 Correct 1 ms 768 KB Output is correct
3 Correct 1 ms 768 KB Output is correct
4 Correct 2 ms 768 KB Output is correct
5 Correct 1 ms 768 KB Output is correct
6 Correct 1 ms 768 KB Output is correct
7 Correct 2 ms 768 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 161 ms 4172 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 1664 KB Output is correct
2 Correct 103 ms 1656 KB Output is correct
3 Correct 200 ms 1704 KB Output is correct
4 Correct 152 ms 1756 KB Output is correct
5 Runtime error 1819 ms 524292 KB Execution killed with signal 9 (could be triggered by violating memory limits)
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 297 ms 1724 KB Output is correct
2 Correct 282 ms 1656 KB Output is correct
3 Correct 196 ms 1784 KB Output is correct
4 Correct 18 ms 1664 KB Output is correct
5 Runtime error 390 ms 524292 KB Execution killed with signal 9 (could be triggered by violating memory limits)
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 768 KB Output is correct
2 Correct 1 ms 768 KB Output is correct
3 Correct 1 ms 768 KB Output is correct
4 Correct 2 ms 768 KB Output is correct
5 Correct 1 ms 768 KB Output is correct
6 Correct 1 ms 768 KB Output is correct
7 Correct 2 ms 768 KB Output is correct
8 Runtime error 161 ms 4172 KB Execution killed with signal 11 (could be triggered by violating memory limits)
9 Halted 0 ms 0 KB -