Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7509 - Массивт байгаа эсэх

Өгагдсөн нэг хэмжээст бүхэл тоон массивт өгөгдсөн тоо байвал YES үгүй бол NO гэж хэвлэ. Таарангуут давталтыг зогсоох.

Input

Эхний мөрөнд массивын элементийн тоо. n<=100.

Хоёр дахь мөрөнд массивын элементүүд зайгаар тусгаарлагдан өгөгдөнө. Int төрөл

Гурав дахь мөрөнд хайх бүхэл тоо.

Output

Байвал YES үгүй бол NO.

Example

Input:
5
1 2 3 4 5
2
Output: YES

Нэмсэн:Bataa
Огноо:2013-01-15
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2024-05-06 07:32:16


Last edit: 2024-05-06 07:35:24
2024-04-03 03:33:58
#include <iostream>
#include <fstream>
using namespace std;

int main() {
int a[256] = {0};
char n;
ifstream MyFile("studentzip.txt");
ofstream myfile("studentzip1.txt");
if (MyFile.is_open()) {
while (MyFile.get(n)) {
a[n]++;
}
MyFile.close();
for (int i = 0; i < 256; i++) {
if (a[i] > 0) {
myfile << "Count of '" << (char)i << "': " << a[i] << endl;
}
}
myfile.close();
} else {
cout << "Unable to open file" << endl;
}
return 0;
}
2024-03-20 01:37:22


Last edit: 2024-03-20 01:40:32
2024-01-21 08:40:34
#include<stdio.h>
int main(){
int i,n,a[1000],c,s=0;
scanf("%d",&n);
for(i=0; i<n; i++){
scanf("%d",&a[i]);
}
scanf("%d",&c);
for (i=0; i<n; i++){
if(a[i]==c) s++;
}
if(s==0) printf("NO");
else printf("YES");
}
//duu nar huul2
2024-01-10 05:48:52
namuunaa_mine
2024-01-02 10:07:06
import java.util.Scanner;

public class Think {
public static void main(String[] args) throws java.lang.Exception {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int[] b = new int[a];
int s;
int j = 0;
int i = 0;
while (i < a) {
b[i] = in.nextInt();
i++;
}

s = in.nextInt();
i = 0;
while (i < a) {
if (b[i] == s) {
j = s;
}
i++;
}
if (s == j) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
2023-05-29 04:30:28
kh.musheeeleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
2023-05-29 04:20:47
aminak_mine
2023-05-29 04:19:36
mishka_mine


Last edit: 2023-05-29 04:21:29
2023-05-29 04:18:51
oyudr_mine
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.