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
2024-11-12 07:20:01
ymar zavaan
































bee ylgumkhuu
2024-11-12 07:06:35
yamr buzar yum be yooo
2024-11-12 04:36:14
https://garticphone.com/en/?c=01d02ba0ed
2024-11-09 08:32:46
#include <bits/stdc++.h>

using namespace std;
int main() {
int t;
cin >> t;

int a, b, d;
cin >> a >> b >> d;

int c[3] = {a, b, d};
vector<pair<int, int>> o;
sort(c, c + 3);
if ((c[0] + c[1] + c[2]) % 3 != 0) {
cout << "No" << endl;
return 0;
}
int tt = (c[0] + c[1] + c[2]) / 3;

while (c[0] != t || c[1] != tt || c[2] != tt) {
sort(c, c + 3);
if (c[0] < tt) {
c[0]++;
c[2]--;
o.push_back({c[0], c[2]});
} else if (c[2] > tt) {
c[0]--;
c[2]++;
o.push_back({c[0], c[2]});
}
}
cout << "Yes" << endl;
cout << o.size() << endl;
if (t == 1) {
for (auto& op : o) {
cout << op.first << " " << op.second << endl;
}
}

return 0;
}
2024-11-07 07:49:19
.

Last edit: 2024-11-07 07:49:33
2024-11-07 04:13:04
▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ▬▬ι═══════ﺤ
2024-11-05 10:13:25
https://www.crazygames.com/game/worldguessr?czy_invite=true&utm_source=invite&code=277761
2024-11-05 10:11:51
https://www.crazygames.com/game/worldguessr?czy_invite=true&utm_source=invite&code=577405
2024-10-24 17:28:53
2024-10-22 13:15:58
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⣴⣤⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣰⣾⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢠⡿⠋⠉⠉⠛⠛⠛⠋⠉⠙⢿⡆⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣼⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣧⠀⠀⠀⠀⠀⠀
⡰⠉⠉⠁⠉⡙⠹⢠⢾⣛⠛⢶⢀⡶⠛⣛⠳⡄⡏⢋⠉⠉⠉⠉⢢
⢹⠶⠶⠶⣾⠡⣾⠈⠸⡿⠷⠀⠀⠀⢾⣿⠇⠁⡶⡌⢷⠶⠶⠶⡏
⢸⠀⠀⠀⠆⠀⢻⡀⠀⠀⡀⠀⠀⠀⢀⢀⡀⠀⡟⠀⠸⡀⠀⠀⡇
⢸⠀⠀⢸⠀⠀⠈⡇⣠⠒⠓⠤⣀⠤⠘⠀⡘⢰⠃⠀⠀⡇⠀⠀⡇
⢸⠀⠀⡎⠀⠀⠀⢻⠀⠙⣶⣶⣒⣶⣶⠋⢀⡏⠀⠀⠀⢸⠀⠀⡇
⢸⠀⠀⡇⠀⠀⠀⠘⣧⡀⠈⠿⣿⡿⠁⢀⢮⠃⠀⠀⠀⢸⠀⠀⡇
⢸⠀⠀⡇⠀⠀⠀⠀⢰⠑⠄⣀⠀⢀⡠⠊⡌⠀⠀⠀⠀⢸⠀⠀⡇
⢸⠀⠀⠘⢄⠀⠀⠀⠀⠆⠀⠀⠀⠀⠀⠰⠀⠀⠀⠀⡠⠃⠀⠀⡇
⠈⠦⣀⣔⠂⠋⠒⠲⠶⠾⠤⠤⠤⠤⠤⠷⠶⠖⠒⠉⠒⢢⣀⠴⠃
⠀⠀⠀⠅⠉⠉⠉⠉⠉⠒⠒⠒⠒⠒⠒⠊⠉⠉⠉⠉⠉⠨⡀⠀⠀
⠀⠀⠀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠁⠀⠀
⠀⠀⠀⠳⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡜⠀⠀⠀
⠀⠀⠀⠀⠱⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠎⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠈⠢⢄⣀⡀⢀⠀⡀⢀⠀⣀⣀⡠⠔⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⡌⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠸⠤⠠⠀⢀⣀⣀⣀⠀⠀⠤⠤⠖⠀⠀⠀



2024-10-24 12:55:35
⣿⣿⣿⣿⣿⣦⡄⢸⡏⢻⡙⠛⠒⠲⠤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣨⡿⠁⢐⣴⣿⣴⣦⣤⣤⣤⣶⣦⣼⣤⣤⣧⣷
⣿⣿⣿⣿⣿⣿⣧⢸⡇⢻⡇⠀⠀⠀⠀⠀⠀⢉⠑⠲⣦⣄⣀⡀⠀⠀⠀⠀⠀⣀⠀⠀⠘⢣⣀⣾⣿⣿⣿⣿⢉⢿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣇⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠛⠢⣍⠑⠒⠢⠤⣴⣿⣦⡀⠀⣤⣿⡟⢿⣿⡶⠶⣼⣆⡉⠙⢿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣄⠀⠀⠀⠀⠀⠀⣿⠀⣷⡈⠑⡄⠀⠀⠈⣹⣿⣿⣶⣶⢻⡿⣏⢻⣝⣷⣦⣀⠈⠉⠙⠻⢿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢦⣄⠀⠀⢰⣿⠀⠸⣷⣦⡏⠀⠀⠠⠈⢹⣿⣿⡵⢋⣴⣿⣷⣿⣷⣾⣭⡛⣷⣮⣕⣤⠹⣿⣿
⣿⣿⣿⣿⣿⣿⣿⡿⣿⣿⣿⣿⣿⣿⣿⣷⣌⣓⣦⣼⣿⣤⣤⣿⡭⠄⠀⠀⠀⠀⢸⣾⠏⣰⣿⣿⣿⣿⠁⠞⣿⣿⠿⣮⣻⡍⠻⣷⣿⠿
⣿⣿⣿⣿⣿⣿⣍⣀⣿⣿⣿⣿⣿⣿⣿⡟⠉⠁⢄⣐⢦⡩⡉⣹⠀⠀⠀⢀⣤⣔⣮⣸⣾⣿⣽⡛⠋⠀⠀⠈⠉⠑⢢⣅⣻⠹⠀⠈⢿⣇
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠷⠂⠒⠒⢬⡙⢿⣶⡏⠀⠀⣰⠋⠁⠀⠀⠉⠻⢿⣿⣧⡀⠀⠀⠀⠀⢠⣾⣿⢛⡷⣤⡀⠈⠻
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣁⠀⠀⠀⠀⢀⣠⣾⠟⠀⠀⠠⡇⠀⠀⠀⠀⠀⣀⣠⠌⣉⡙⣷⣄⣀⣤⣾⠟⣡⡟⠁⣸⣿⡄⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠉⠛⢿⣿⣟⠛⠛⠋⠉⠀⠀⠀⠀⣰⣗⠦⣤⣀⣠⠞⠁⠀⡀⠀⠀⠀⠙⢻⣿⣃⣾⣿⣥⣼⡇⣿⣿⡄
⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠈⢿⣧⠀⠀⠀⣀⡤⠴⠚⠉⠀⠐⠊⠁⣿⠀⠀⠀⠀⠀⠀⠀⠀⠸⡹⣿⡁⠀⠈⠙⠓⠻⠿⢷
⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠈⢿⣧⠔⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⣠⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠃⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⢀⡜⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣤⣶⠿⠿⠿⢻⣿⠁⠀⣉⣾
⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⡏⡠⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣿⣿⣿⣿⣿⣿⣿⣶⣶⣶⢟⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⣇⣁⡴⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠛⣡⡼⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⡆⠰⣄⠀⠀⢀⣼⣯ylguum⣴⣶⣿⣿⣶⣶⣤⣀⠀⠀⠀⢠⡾⠟⠛⢉⣩⠤⠝⢒⣉⠀⠀⢀⣠⠴⢛⣿⡟⣹⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣼⣿⣿⡿⠟⠋⠁⠀⠀⠀⠀⠈⠙⢿⣷⣄⠀⡞⢀⣤⣶⡋⠀⠀⣬⣡⡤⠴⠚⠋⣁⡴⣿⠞⢰⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⠋⣿⣿⣿⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⣆⣷⣿⣿⣿⣿⣷⣤⣤⣀⣀⣤⣤⣾⣿⡾⠃⢀⣿⣿⣿⣿⣿⣿
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.