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

RGB7621 - Нэмэгдэхүүн давхцахгүй

Өгөгдсөн n  тоог нийлбэрт задлахдаа тухайн нийлбэрт орж байгаа нэмэгдэхүүнүүд нь давхцаагүй байхаар хичнээн боломжоор задлах вэ?

Input

n натурал тоо өгөгдөнө. n<=200.

Output

Боломжийн тоо.

Example

Input:
6

Output:
4

Нэмсэн:Bataa
Огноо:2013-04-02
Хугацааны хязгаарлалт: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-02-11 16:49:21
hervee eniig unshij bga bol guuyi hzeech btgi programming ylanguya olimpiadiin bodlogo boddog haraal idsen zuiliig hii neereeshu hairan zaluu nas tolgoi bodol sanaa biye haagaa yund heregtei ni medegdehgui yumand zartsuulna. etsesd ni tolgoi chn hereglegdehgui onol tseejilsen bodloguudaar biye chn oohoor duureed duusna odoo boli guyia bi tanaraas zaluu bga deeree
2024-08-06 06:42:09
⠣⠄⠀⠀⠂⠀⠀⠀⠉⠉⠁⠀⠀⢠⣿⣰⡿⢩⡿⠀⠉⠉⠀⡠⣼⣾⠏⠋⠷⢦⣄⡀⠀⢠⠴⠆⢺⡇⢾⣧⠀⠉⠀⠀⠀⠀⢸⡆⠀⠀⠀⠀⠀⠸⣧⠀⠀⠀⠀⠀⠀⢻⠀⠀⠀
⠈⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣷⡟⠀⢸⡇⠀⠀⠀⠀⠀⡟⣸⠃⠀⠀⠀⠀⠉⠉⠀⠀⠀⢸⡇⣾⠿⡆⠀⠀⠀⠀⠀⠐⣇⠀⠀⠀⠀⠀⠀⣿⠀⠉⠀⠀⠀⠀⢸⠀⠀⠀
⠀⠁⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⠟⠀⠀⢸⡇⠀⠀⠀⠀⢸⡇⢿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣧⣸⠀⢻⡄⠀⠀⠀⠀⠀⢻⠀⠀⠀⠀⠀⠀⢸⡆⠀⠀⠀⠀⠐⠀⡇⠀⠀
⠆⢠⠇⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⡏⠀⢇⡤⢸⡇⠀⠀⠀⢀⣼⠃⢸⡇⠀⠀⠀⠀⠀⠀⣤⠀⠀⠀⣿⣿⠀⠘⣿⡄⠀⠀⠀⠀⠘⣇⠀⠀⠀⠀⠀⠸⡇⠀⠀⠀⠀⠀⠀⡇⠀⠀
⠐⡞⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⡟⠀⠀⠀⠀⢸⣇⣤⣤⣤⣸⣿⠀⠸⡇⠀⣤⡄⠀⠀⠀⣿⡄⠀⠀⢻⣿⣤⣤⣘⣧⡠⠀⠀⠠⠄⢿⡆⠀⠀⠀⠀⠀⣷⠀⠀⠀⠀⢤⠀⡇⠀⠀
⢠⠇⠀⠀⠀⠀⠀⠀⠀⠀⣿⡿⠀⠀⣀⡤⠶⢺⣿⡟⠛⠛⢻⡿⠀⠀⣷⠀⣿⣧⠀⠀⠀⣏⣿⡀⠀⡻⣿⡍⠉⠉⠛⣿⣶⣄⠀⠀⠘⣿⡀⠀⠀⠀⠀⣿⠀⠀⠀⠀⢸⡆⡇⠀⠀
⣸⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⠷⠒⠉⠀⠀⠀⠸⣿⢿⡄⠀⢸⡇⠀⠀⢹⡇⣿⢹⣆⠀⠀⣿⠈⣧⡀⠀⠹⣧⠀⠀⠀⠈⢿⣯⣿⣷⣦⣹⣷⠀⠀⠀⠀⠙⠁⠀⠀⠀⡎⣷⡇⠀⠀
⡇⠀⠀⠀⠀⢀⣀⣴⠟⢹⡏⠀⠀⠀⠀⠀⠀⠀⢻⡜⣷⣄⢸⠃⠀⠀⠸⣿⣿⠀⢿⡄⠀⢹⠀⠘⢷⡀⠀⣿⠀⠀⠀⠀⠀⠹⣿⡞⢿⡿⣿⣦⠀⠁⠀⠀⠀⠀⠀⡀⣧⣿⡇⠀⢀
⠁⠀⠰⡀⠀⢸⣿⠁⠀⣸⠁⠀⠀⢲⣤⣤⣀⣳⣌⣇⠘⣿⣿⣦⡀⠀⠀⢹⣿⡆⠈⢿⣦⣿⣇⠀⠀⠻⣦⣼⡧⠤⠤⠤⢄⣀⣀⡙⠮⢻⣎⢿⣿⣧⣄⠄⠀⠀⠀⠀⢻⣾⡧⠞⠋
⠀⠀⠘⡃⠀⢸⣿⠀⢀⡿⠀⣲⣶⣿⠿⠛⠛⠛⠛⣻⣷⣮⣿⡇⠁⠀⠀⠀⢻⡇⠀⠈⢿⡟⣿⠀⠀⠊⠉⢛⣷⣠⣤⣤⣴⣞⣉⣉⣀⣀⠙⢿⣿⣯⠻⣷⠆⠀⠀⠀⢸⡿⡇⠀⠀
⠀⠀⠀⣧⠀⢸⣿⣧⣼⣷⣾⡿⠋⠀⠀⠀⠀⢠⣿⡟⠻⠟⢻⣷⡄⠀⠀⠀⠀⢹⠀⠀⠀⠙⠊⠁⠀⣴⣾⣿⣿⣿⣿⣯⡉⠙⠻⣿⣿⣦⣀⠀⠈⢻⣇⢹⣷⡀⠀⠀⠀⣿⡇⠀⠀
⠀⠀⠀⣿⠀⢸⣿⣷⢹⡇⠈⠛⠆⠀⠀⠀⢀⣿⣿⣷⣆⣀⣾⣿⡇⠀⠀⠀⠀⠀⣧⢀⠀⠀⠀⠀⠈⢡⣾⣏⠉⠉⠁⣹⣿⡆⠀⠀⠙⠻⣿⣿⠉⠁⠻⣼⡿⠿⣦⡀⡀⢿⡇⠀⢰
⠀⠀⠀⢸⡇⢸⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠓⠚⠁⠀⠴⠊⠁⠀⠀⠘⠋⠀⠀⠀⠀⠀⠘⢿⣿⣶⣶⠾⢽⣿⡇⠀⠀⠀⣀⡾⠿⠷⢦⣀⣽⡇⠀⢸⣿⣿⣾⡇⢀⣿
⠀⠀⠀⠀⣧⢼⣿⣿⡞⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠃⠈⠉⠀⠀⠀⠀⡀⣠⣿⠁⠀⣼⣧⡘⠻⣇⣾⣿
⠀⠀⠀⠀⢻⣿⡏⠈⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤⣒⡭⢡⣿⣧⡶⠛⠋⠉⢷⣀⣿⣿⣿
⡆⠀⠀⠀⢸⣿⡇⢰⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠨⠒⠉⠁⠀⣸⣿⠋⠀⣠⢴⠂⣾⣿⣿⣿⣿
⢣⠀⠀⠀⠈⣿⡇⢸⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡿⠃⢠⠞⠷⠾⠀⣿⣿⣿⣿⣿
⢸⠀⠀⠀⠀⢿⣷⠀⢿⣧⠀⠀⣠⣴⠄⠀⠀⠀⠀⠀⠀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⢫⠃⢠⠋⢳⠀⠀⠀⣿⣿⣿⣿⣿
⠘⣇⠀⠀⠀⠘⢿⢳⣄⣹⠴⠋⠁⡼⠀⠀⠀⠀⠀⠀⢰⣿⣯⣗⣶⠒⠢⠤⠤⠤⠤⠤⣔⣻⣿⣷⡄⠀⠀⠀⠀⡿⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢈⡇⠈⣇⡼⠀⣠⠞⣿⣿⣿⣿⣿
⠄⢿⡆⣠⣤⡶⠞⠓⠉⠉⠀⠀⡴⠃⠀⠀⠀⠀⠀⠀⣼⡿⠋⠀⠉⠙⠒⠒⠒⢶⠚⠉⠉⠀⠳⣿⡇⠀⠀⠀⠀⡇⠘⢦⠀⠀⠀⠀⠀⠀⢠⣶⡿⠟⠒⠋⣠⠞⠁⣼⣿⣿⣿⣿⣿
⠀⡸⠋⠉⠀⠀⠀⠀⢀⣠⢶⡏⠀⠀⠀⠀⠀⡀⠀⠀⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⠃⠀⠀⠀⠀⣿⠀⠈⢳⡀⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⠇
⠛⠀⠀⠀⠀⣀⣤⣖⣹⡇⢸⣿⣄⠀⠀⠀⠷⠁⠀⠀⢸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⠂⠀⠀⠀⠀⠘⡆⠀⠀⠘⢳⣤⣴⣦⣀⠨⢃⣠⠴⣶⣿⣿⣿⣿⣿⣿⣿⡟⠀
⠀⠀⠀⠀⣴⠟⠁⠀⢸⣿⣼⣿⣿⣷⣀⠀⠀⠀⠀⠀⠀⠻⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡟⠀⠀⠀⠀⠀⠀⠘⢦⡀⠀⠀⠘⢿⡿⢿⣿⣿⠃⢠⣿⡟⢸⣿⣿⣿⣿⡟⠀⠂
⠀⠀⣠⡞⠁⠀⠀⠀⣸⠋⠉⢻⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠘⢷⠤⣀⠀⠀⠀⠀⠀⠀⠀⢀⡾⢁⡤⠲⠤⣄⠀⠀⣠⣤⣿⣆⠀⠀⠈⠳⡀⢠⠏⠀⢸⣿⡇⠈⣿⣿⣿⡟⠘⠀⠀
⠀⢀⣿⠁⠀⠀⠀⢀⡇⠀⠀⢸⠀⠉⠛⣿⣿⣦⣄⠀⠀⠀⠀⠘⡆⢨⠙⢦⣄⡀⠀⢀⡠⠞⠀⡞⠀⠀⠀⠈⣱⠾⢻⠽⠛⠙⣆⠀⠀⠀⠙⢿⠲⣄⣸⣿⡇⠀⢸⣿⠏⠀⠀⢀⡀
⠀⠜⡜⠀⠀⠀⠀⣸⠀⠀⠀⢸⡄⠀⠀⢸⣿⣷⡈⠳⣄⠀⠀⠀⢧⡄⠀⠀⠈⢏⢙⡏⠀⠀⣸⠁⠀⠀⡴⠋⠁⢼⠁⠀⠀⠀⠘⢷⠦⣀⡀⠀⠀⠈⢻⣿⡇⢀⡾⠏⠁⠀⣠⠞⣱
⠀⡐⠀⠀⠀⢀⡞⠁⠀⠀⢀⣾⡇⠀⠀⠀⢿⣿⣧⠀⠀⠳⣤⡀⠘⣇⠀⠀⠀⠘⠚⠀⠀⣠⡿⠀⠀⢰⡇⠀⠀⢸⡀⠀⠀⠰⡄⣸⠀⠀⠀⠀⠀⠀⢸⣿⣷⡟⠁⠀⢀⡴⠗⠋⠉
⢠⠃⠀⠀⣠⠋⠀⢀⣠⣾⣿⣿⢷⡀⠀⠀⠈⢿⣿⡄⠀⠀⠘⢿⣷⣭⡀⠀⠀⣀⣤⣴⡿⣿⠀⠀⠀⢰⡇⠀⠀⠀⡇⠀⠀⠀⡟⠁⠀⠀⠀⠀⠀⠀⠘⣿⣿⣧⠀⢤⡾⠀⠀⠀⠀
⢸⡆⢀⡞⠁⢀⡔⠋⣿⣿⠛⠋⠀⠙⢦⣀⡐⡈⠻⣿⣦⣤⣄⣀⣙⣿⣿⣿⣽⣿⣿⣿⡀⢸⡀⠀⠀⢸⣿⠀⠀⠀⡝⠀⠀⠀⣏⠑⣒⡒⠒⠒⠂⠀⠀⠘⣿⣏⠀⣿⠃⠀⠀⠀⠀
⠀⠛⠚⠒⠒⠉⠀⣸⣿⣿⣦⣴⠶⠒⠒⠿⣍⠛⠲⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡌⡟⢦⠀⣼⣿⣄⠀⠀⢹⠀⠀⠀⢹⡎⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⡆⣿⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠠⠴⠛⠉⠉⠀⠀⠀⠀⠀⠀⢳⡷⢾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠘⣷⠟⠻⢿⣦⡀⠈⢧⠀⠀⠀⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⡀⠀⠀⠀⠀
⠀⠀⠀⢀⠁⠀⠀⠀⠀⠀⠀⣀⣠⣤⣶⣾⡏⠙⢯⡛⠿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⠟⠀⠀⠀⠉⠳⣜⠻⣷⠢⣄⢸⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣷⣦⣤⣤⡀
⠀⠀⠀⠀⠀⠀⣀⣦⡤⣶⣿⣏⣿⠇⢸⣿⠇⠀⠀⠈⠳⢤⣀⠀⠈⠉⠙⠛⠛⠛⠛⠛⠛⠛⠛⠋⠳⡄⠀⠀⠀⠀⠈⠓⠾⣇⠘⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣷
2023-11-29 01:28:26


Last edit: 2023-11-29 01:33:45
2023-11-29 01:25:54
#include <bits/stdc++.h>
using namespace std;

int main() {
int a[100], i, max, min, n;
cin>>n;
for(i=1; i<=n; i++){
cin>>a[i];
}
for(i=1; i<=n; i++){
if(a[i]>a[i+1]){
max=a[i];
}
if(a[i]<a[i+1]){
min=a[i];
}
swap(min, max);
}
for(i=1; i<=n; i++){
cout<<fixed<<setprecision(2)<<a[i]<<" ";
}
cout<<endl;
return 0;
}
2023-05-03 06:36:51
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
/*
JABI
*/
#define ordered_set tree<int, null_type,less<long long>, rb_tree_tag,tree_order_statistics_node_update>
#define ll long long
#define ull unsigned long long
#define pb push_back
#define llm map<long long,long long>
#define llq queue<ll>
#define F first
#define S second
#define mod 1000000007
void fastread(){
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
}
ll dp[210][210],n,y,d,k,t,w,h,m,i,j,ans,l;
//ordered_set o_s;
string s;
int main()
{
fastread();
cin>>n;
dp[1][1]=1; dp[2][1]=1; dp[3][1]=1; dp[3][2]=1;
for(i=4;i<=n;i++){
dp[i][1]=1;
for(j=2;j<=n;j++){
for(k=1;k<=i/j;k++){
dp[i][j]+=dp[i-(k*j)][j-1];
}
}
}
for(i=1;i<=n;i++){
l+=dp[n][i];
}
cout<<l;
}

Last edit: 2023-05-03 06:37:24
2023-03-15 09:35:35
15 123 24 06
2023-03-13 03:54:35
zazailaa
2022-11-26 06:11:24
tolgoi zadrlaaaa
2022-04-12 13:56:23
&&&777wew
2022-04-12 13:56:06
sheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeesh
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.