Submission #1091774

#TimeUsernameProblemLanguageResultExecution timeMemory
1091774_rain_Visiting Singapore (NOI20_visitingsingapore)C++14
10 / 100
1 ms456 KiB
#include<bits/stdc++.h> using namespace std; #define ll long long #define fixbug true const int maxn = 1e3; int K , n , m , A , B; int s[maxn+2] , t[maxn+2] , v[maxn+2]; namespace subtask1{ bool check(){ return K==1; } void main_code(){ if (n < m){ cout << n * v[1] + B * (m - n) + A; exit(0); } cout << m * v[1] << '\n'; exit(0); } } namespace subtask2{ bool check(){ return A==B&&B==0; } void main_code(){ } } int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> K >> n >> m >> A >> B; for (int i = 1; i <= K; ++i) cin >> v[i]; for (int i = 1; i <= n; ++i) cin >> s[i]; for (int i = 1; i <= m; ++i) cin >> t[i]; if (subtask1::check()){ subtask1::main_code(); exit(0); } }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...