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
*/

目录
相关文章
AtCoder Beginner Contest 225 F.String Cards(dp)
AtCoder Beginner Contest 225 F.String Cards(dp)
88 0
ZOJ - Problem Set - 3985 String of CCPC
ZOJ - Problem Set - 3985 String of CCPC
96 0
ZOJ - Summer 2018 - Contest 1 by SBconscious - Problems - 1001: Saber
ZOJ - Summer 2018 - Contest 1 by SBconscious - Problems - 1001: Saber
94 0
|
人工智能
Educational Codeforces Round 33
A. Chess For Three time limit per test1 second memory limit per test256 megabytes inputstanda...
1168 0
|
机器学习/深度学习
|
人工智能
Educational Codeforces Round 31 A B C
A. Book Reading time limit per test2 seconds memory limit per test256 megabytes inputstandard...
1109 0