codeforces 560 A. Currency System in Geraldion

简介:

题目链接:http://codeforces.com/problemset/problem/560/A

#include <iostream>
using namespace std;
int main()
{
    int m,num,ans=1;
    cin>>m;
    for(int i=0; i<m; i++)
    {
        cin>>num;
        if(num == 1)
            ans=-1;
    }
    cout<<ans<<endl;
    return 0;
}

/*
Input
5
1 2 3 4 5
Output
-1
Answer
-1
*/

目录
相关文章
codeforces 339A.Helpful Maths B.Xenia and Ringroad 两水题
.题意就是把字符串里面的数字按增序排列,直接上代码。
41 0
|
C++
【PAT甲级 - C++题解】1129 Recommendation System
【PAT甲级 - C++题解】1129 Recommendation System
61 0
|
人工智能 JavaScript BI
AtCoder Beginner Contest 222 D - Between Two Arrays(前缀和优化dp)
AtCoder Beginner Contest 222 D - Between Two Arrays(前缀和优化dp)
107 0
HDU-1690,Bus System(弗洛伊德)
HDU-1690,Bus System(弗洛伊德)
HDU-1002,A + B Problem II(Java大数)
HDU-1002,A + B Problem II(Java大数)
ZOJ - Problem Set - 3985 String of CCPC
ZOJ - Problem Set - 3985 String of CCPC
100 0
HDOJ(HDU) 2061 Treasure the new start, freshmen!(水题、)
HDOJ(HDU) 2061 Treasure the new start, freshmen!(水题、)
135 0
|
机器学习/深度学习
Codeforces 791A Bear and Big Brother(暴力枚举,模拟)
A. Bear and Big Brother time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard ou...
1278 0