제출 #568789

#제출 시각아이디문제언어결과실행 시간메모리
568789shrimb가로등 (APIO19_street_lamps)C++17
0 / 100
0 ms212 KiB
#pragma GCC optimize ("Ofast") #pragma GCC target ("avx,avx2,fma") #include"bits/stdc++.h" using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template<class x> using ordered_set = tree<x, null_type,less<x>, rb_tree_tag,tree_order_statistics_node_update>; #define int long long #define endl '\n' #define mod 1000000007 //\ #define mod 1686876991 signed main () { cin.tie(0)->sync_with_stdio(0); int n, q; cin >> n >> q; string s; cin >> s; if (n <= 100 and q <= 100) { vector<string> v; while (q--) { v.push_back(s); string t; cin >> t; if (t == "query") { int l, r, ans = 0; cin >> l >> r; for (auto i : v) { bool good = 1; for (int j = l - 1 ; j < r ; j++) { if (i[j] == '0') good = 0; } ans += good; } cout << ans << endl; } else { int i; cin >> i; s[i-1] = '0'+((s[i-1]-'0')^1); } } } }

컴파일 시 표준 에러 (stderr) 메시지

street_lamps.cpp:17:1: warning: multi-line comment [-Wcomment]
   17 | //\
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...