結果
問題 | No.1544 [Cherry 2nd Tune C] Synchroscope |
ユーザー | outline |
提出日時 | 2021-06-11 21:32:27 |
言語 | C++17 (gcc 13.2.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,706 bytes |
コンパイル時間 | 1,324 ms |
コンパイル使用メモリ | 140,264 KB |
実行使用メモリ | 160,036 KB |
最終ジャッジ日時 | 2023-08-21 11:40:26 |
合計ジャッジ時間 | 6,967 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 93 ms
116,132 KB |
testcase_01 | AC | 115 ms
108,348 KB |
testcase_02 | AC | 77 ms
130,320 KB |
testcase_03 | AC | 86 ms
106,408 KB |
testcase_04 | AC | 85 ms
138,796 KB |
testcase_05 | AC | 92 ms
151,232 KB |
testcase_06 | AC | 84 ms
149,600 KB |
testcase_07 | AC | 77 ms
126,956 KB |
testcase_08 | AC | 87 ms
123,008 KB |
testcase_09 | AC | 87 ms
158,152 KB |
testcase_10 | AC | 84 ms
153,160 KB |
testcase_11 | AC | 82 ms
131,856 KB |
testcase_12 | AC | 79 ms
129,952 KB |
testcase_13 | AC | 86 ms
143,924 KB |
testcase_14 | AC | 74 ms
119,300 KB |
testcase_15 | AC | 93 ms
158,728 KB |
testcase_16 | AC | 78 ms
124,136 KB |
testcase_17 | AC | 86 ms
152,356 KB |
testcase_18 | AC | 79 ms
129,500 KB |
testcase_19 | AC | 79 ms
131,732 KB |
testcase_20 | AC | 87 ms
146,264 KB |
testcase_21 | AC | 79 ms
125,784 KB |
testcase_22 | AC | 73 ms
113,832 KB |
testcase_23 | AC | 71 ms
103,032 KB |
testcase_24 | AC | 70 ms
102,772 KB |
testcase_25 | AC | 69 ms
103,524 KB |
testcase_26 | AC | 69 ms
103,388 KB |
testcase_27 | AC | 71 ms
102,640 KB |
testcase_28 | AC | 70 ms
102,784 KB |
testcase_29 | AC | 71 ms
103,704 KB |
testcase_30 | AC | 71 ms
102,996 KB |
testcase_31 | AC | 71 ms
102,900 KB |
testcase_32 | AC | 70 ms
103,312 KB |
testcase_33 | AC | 79 ms
102,808 KB |
testcase_34 | AC | 113 ms
110,056 KB |
testcase_35 | AC | 122 ms
110,468 KB |
testcase_36 | AC | 96 ms
142,312 KB |
testcase_37 | AC | 96 ms
103,736 KB |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | WA | - |
testcase_43 | WA | - |
testcase_44 | WA | - |
testcase_45 | WA | - |
testcase_46 | WA | - |
testcase_47 | WA | - |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <queue> #include <string> #include <map> #include <set> #include <stack> #include <tuple> #include <deque> #include <array> #include <numeric> #include <bitset> #include <iomanip> #include <cassert> #include <chrono> #include <random> #include <limits> #include <iterator> #include <functional> #include <sstream> #include <fstream> #include <complex> #include <cstring> #include <unordered_map> #include <unordered_set> using namespace std; #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") #pragma GCC target("avx512f,avx512dq,avx512cd,avx512bw,avx512vl") using ll = long long; constexpr int INF = 1001001001; // constexpr int mod = 1000000007; constexpr int mod = 998244353; template<class T> inline bool chmax(T& x, T y){ if(x < y){ x = y; return true; } return false; } template<class T> inline bool chmin(T& x, T y){ if(x > y){ x = y; return true; } return false; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n, m; cin >> n >> m; vector<int> a(n), b(m); for(int i = 0; i < n; ++i) cin >> a[i]; for(int i = 0; i < m; ++i) cin >> b[i]; while(a.size() < 10000000){ for(int i = 0; i < n; ++i) a.emplace_back(a[i]); } while(b.size() < 10000000){ for(int i = 0; i < m; ++i) b.emplace_back(b[i]); } for(int i = 0; i < 10000000; ++i){ if(a[i] == b[i]){ cout << i + 1 << endl; return 0; } } cout << -1 << endl; return 0; }