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

RGB7002 - Гурвалжин

Өгөгдсөн гурвалжны периметрийг ол.

Input

Гурвалжны талууд бүхэл тоогоор нэг мөрөнд зайгаар тусгаарлагдан өгөгдөнө.

Output

Гурвалжны периметр.

Example

Input:
3 4 5

Output:
12


Нэмсэн:Bataa
Огноо:2011-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
2025-01-21 02:55:30
class NumArray {
public:
vector<int> prefix;

NumArray(vector<int>& array) {
int n = array.size();
prefix.resize(n);

prefix[0] = array[0];
for (int i = 1; i < n; i++) {
prefix[i] = prefix[i - 1] + array[i];
}
}

int sumRange(int left, int right) {
if (left == 0) return prefix[right];
else return prefix[right] - prefix[left - 1];
}
};


/**
* Your NumArray object will be instantiated and called as such:
* NumArray* obj = new NumArray(nums);
* int param_1 = obj->sumRange(left,right);
*/

Last edit: 2025-01-27 03:20:55
2025-01-20 09:11:43
https://s.team/p/gcpb-cjbv/NRMCMVQQ
2025-01-16 07:11:41
#include <iostream>
#include <bits/stdc++.h>
#include <cmath>
using namespace std;

int main() {
int n,d,t[123456],l[123456],i,j,a=0,b,x[1000];
cin>>n>>d;
for(i=1;i<=n;i++){
cin>>t[i]>>l[i];
}
for(j=1;j<=d;j++){
a=0;
for(i=1;i<=n;i++){
b=t[i]*(j+l[i]);
if(a<b)
a=b;
}
cout<<a<<endl;

}

return 0;
}

2025-01-15 06:23:05
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,c=0,i,j;
cin >>a;
for(i=1;i<=9;i++){
for(j=1;j<=9;j++){
if(a!=i*j){
c=c+i*j;}
}

}
cout <<c;
return 0;
}

2025-01-14 14:39:58
https://s.team/p/fvrn-rgmc/qbdjnrkb
2025-01-14 14:30:27
https://s.team/p/fvrn-rgmc/qbdjnrkb
2025-01-14 14:30:20
https://s.team/p/fvrn-rgmc/qbdjnrkb\
2025-01-04 07:43:10
#include <bits/stdc++.h>

#define ll long long
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<ll> a(n + 1);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
double l = 0, r = 1e8;
int s = 0;
for (int i = 0; i < 100; i++){
double m = (l + r) / 2;
s = 0;
for (int i = 0; i < n; i++) {
s += (int) a[i] / m;
}
if (s >= k) {
l = m;
}else {
r = m;
}
}
cout << l << endl;
return 0;
}
2024-12-13 06:41:30
https://play.typeracer.com?rt=tskq4mu15
2024-12-12 08:51:53
https://play.typeracer.com?rt=gsrebewnd
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.