Submission #1351066

#TimeUsernameProblemLanguageResultExecution timeMemory
1351066almaarmudSnail (NOI18_snail)C++20
0 / 100
1 ms344 KiB
/*
██████╗  █████╗ ███████╗██╗  ██╗██╗██████╗ 
██╔══██╗██╔══██╗██╔════╝██║  ██║██║██╔══██╗
██████╔╝███████║███████╗███████║██║██║   ██║
██╔══██╗██╔══██║╚════██║██╔══██║██║██║   ██║
██║  ██║██║  ██║███████║██║  ██║██║██████╔╝ 
╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═╝╚═════╝  
*/
#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;
#define ll long long
#define ull unsigned long long
#define ld long double
#define str string
#define ch char
#define db double
#define pb push_back
#define ff first
#define ss second
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define YES cout<<"YES\n";
#define NO cout<<"NO\n";
#define Bob cout<<"Bob\n";
#define Alice cout<<"Alice\n";
#define ordered_set tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update>
const ll INF = 10000000000;
void solve(){
    ll h,n;
    cin>>h>>n;
    vector<ll>v(n);
    for(int i = 0;i<n;i++){
      cin>>v[i];
    }
    if(n==1 and v[0]<=0){
      cout<<-1<<" "<<-1;
      return;
    }
    if(n==1 and v[0]>0){
      ll alma = h/v[0];
      cout<<alma-1<<" "<<0;
      return;
    }
}
signed main(){
    ll t = 1;
    //cin>>t;
    while(t--){
        solve();
    }
    return 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...