답안 #743033

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
743033 2023-05-17T07:33:14 Z vjudge1 Lasers (NOI19_lasers) C++17
0 / 100
1000 ms 55828 KB
#include<bits/stdc++.h>

using namespace std;

using ll = long long ;
using pii = pair<ll , ll> ;
using i3 = tuple<ll , ll , ll> ;

const int MOD = 1e9+7 , N = 1e9 ;

int n , m , cnt , ans ;

bitset<N> vis ;

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);

    cin >> n >> m ;

    for(int i=1;i<=m;i++){
        int x ; cin >> x ;
        for(int j=1;j<=x;j++){
            int width ;
            cin >> width ;

            for(int now = n - width + 1 ; now <= width ; now++){
                if(!vis[now]){
                    ans++ ;
                    //cout << "block = " << now << " i = " << i << "\n" ;
                }
                vis[now] = true ;
            }
        }
    }

    //cout << "\n" ;

    cout << ans ;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 714 ms 37560 KB Output is correct
3 Correct 51 ms 2852 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Execution timed out 1097 ms 55828 KB Time limit exceeded
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 714 ms 37560 KB Output is correct
3 Correct 51 ms 2852 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Execution timed out 1097 ms 55828 KB Time limit exceeded
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 14 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 14 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 714 ms 37560 KB Output is correct
3 Correct 51 ms 2852 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Execution timed out 1097 ms 55828 KB Time limit exceeded
7 Halted 0 ms 0 KB -