# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1041549 | vjudge1 | Ljetopica (COI19_ljetopica) | C++17 | 1 ms | 348 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 1000000007
void solve(){
ll n ,k , c1 = 0, c2 = 0;
cin >> n >> k;
string a , b , s;
cin >> s >> a >> b;
for(int i = 0 ;i < a.length(); i ++){
c1 = ((c1 * 2) + (a[i] - '0')) % MOD;
c2 = ((c2 * 2) + (b[i] - '0')) % MOD;
}
if(c1 == c2){
c1 = 0 ;
}
if(k == 0){
cout << (c1 + c2) % MOD << '\n';
}
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int tests = 1;
// cin >> tests;
for (int i = 1; i <= tests; i++){
solve();
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |