2019-2020 ACM-ICPC Brazil Subregional Programming Contest

  B - Buffoon

  读入n和vi,如果有vi大于v1输出N,v1大于等于其他vi输出S。

2019-2020 ACM-ICPC Brazil Subregional Programming Contest
#include<bits/stdc++.h>
using namespace std;
typedef long long ll ;
int read(){    int x;scanf("%d",&x);return x;}
int n,a;
int main()
{
    n=read();
    a=read();
    for(n--;n;n--)
    {
        if(read()>a)
        {
            cout<<N;
            return 0;
        }
    }
    cout<<S; 
}
View Code

  H - Hour for a Run

  一个人跑圈,一共v圈每圈n个记号,问分别看到哪个记号可以得知跑过了10%、20%、30%...通过大胆猜测比对样例可以知道是输出v*n*10%、v*n*20%...向上取整。

2019-2020 ACM-ICPC Brazil Subregional Programming Contest
#include<bits/stdc++.h>
using namespace std;
typedef long long ll ;
int read(){    int x;scanf("%d",&x);return x;}
int v,n;
int main()
{
    cin>>v>>n;
    for(int i=1;i<=9;i++)
    {
        int t=ceil(v*n*i*0.1);
        cout<<t<< ;
    }
}
View Code

  

 
 

2019-2020 ACM-ICPC Brazil Subregional Programming Contest

上一篇:k8s-helm


下一篇:CS27th: 5papers