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.|

RGB7474 - Distant Pairs

Problem text...

Input

Input description...

Output

Output description...

Example

Input:
etc.

Output:
etc.

Нэмсэн:Bataa
Огноо:2020-04-18
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 ASM64 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
Эх сурвалж:https://www.hackerrank.com/challenges/distant-pairs/problem

hide comments
2020-06-04 15:04:10
Fuck

Last edit: 2020-06-05 02:36:14
2020-06-04 15:03:54
U

Last edit: 2020-06-05 02:36:45
2020-06-04 15:03:32
#include <bits/stdc++.h>

using namespace std;

int main(){
long n;
cin >> n;
long arr[n];
long sum = 0;
for(int i = 0 ; i < n; i++){
cin >> arr[i];
sum += arr[i];
}
cout << sum << "\n" ;
}
2020-06-04 15:03:18
#include <bits/stdc++.h>
#include <cstdio>

using namespace std;

int main(){
int n;
int pos=0;
int neg=0;
int zero=0;
float one;

cin >> n;
int arr[n];
for(int i = 0; i<n ; i++){
cin >> arr[i];
if(arr[i] == 0){
zero++;
}else{
if(arr[i]>0){
pos ++;
}else{
neg++;
}
}
}

one = (float)1/(float)n;

printf("%f\n%f\n%f",one*(float)pos,one*(float)neg,one*(float)zero);
}


2020-06-04 15:02:59
#include <bits/stdc++.h>

using namespace std;

int main(){
int a;
int zai;
int hashtag;
cin >> a;

for(int i = 0; i<a; i++){
hashtag = i+1;
zai = a-hashtag;
for(int b=0; b<zai; b++){
cout << " " ;
}
for(int b=0; b<hashtag; b++){
cout << "#" ;
}
cout << "\n";
}
return 0;
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.