Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
RGB7518 - Оргил ба ёроол |
Дараалан орсон 2 элемент бүр нь ялгаатай бүхэл тоон дараалал өгөгдөнө. Тоонууд нь өгсөж яваад уруудвал тэрхүү хэсгийг оргил, уруудаж яваад өгсвөл ёроол гэе. Тоон дараалал хэдэн оргил, хэдэн ёроол үүсгэснийг ол. Дарааллын хамгийн эхний болон сүүлийн тоо оргил болон ёроолд тоологдохгүй.
Input
Бүхэл тоон дараалал өгөгдөнө. Дарааллын урт 1000-аас ихгүй.
Output
Оргил болон ёроолын тоо зайгаар тусгаарлагдан нэг мөрөнд хэвлэгдэнэ.
Example
Input: 1 2 5 4 1 9 6 5 3 4 1 -2 Output: 3 2
Нэмсэн: | Bataa |
Огноо: | 2013-02-21 |
Хугацааны хязгаарлалт: | 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
|
||||||
2019-12-29 06:36:14
https://ideone.com/5imsXC |
||||||
2019-12-29 06:17:34
|| || || || ||||||||||| ||||||||||| |||||||||||||||||| |||||||| |
||||||
2019-12-22 05:42:22
|Notes:| 1. Don't post any source code here.| 2. Please be careful, leave short comments only. Don't spam here.| 3. For more discussion (hints, ideas, solutions) please visit our forum.| 4. Authors are allowed to delete the post and use html code here (e.g. to provide some useful links).||Notes:| 1. Don't post any source code here.| 2. Please be careful, leave short comments only. Don't spam here.| 3. For more discussion (hints, ideas, solutions) please visit our forum.| 4. Authors are allowed to delete the post and use html code here (e.g. to provide some useful links).||Notes:| 1. Don't post any source code here.| 2. Please be careful, leave short comments only. Don't spam here.| 3. For more discussion (hints, ideas, solutions) please visit our forum.| 4. Authors are allowed to delete the post and use html code here (e.g. to provide some useful links).||Notes:| 1. Don't post any source code here.| 2. Please be careful, leave short comments only. Don't spam here.| 3. For more discussion (hints, ideas, solutions) please visit our forum.| 4. Authors are allowed to delete the post and use html code here (e.g. to provide some useful links).||Notes:| 1. Don't post any source code here.| 2. Please be careful, leave short comments only. Don't spam here.| 3. For more discussion (hints, ideas, solutions) please visit our forum.| 4. Authors are allowed to delete the post and use html code here (e.g. to provide some useful links).||Notes:| 1. Don't post any source code here.| 2. Please be careful, leave short comments only. Don't spam here.| 3. For more discussion (hints, ideas, solutions) please visit our forum.| 4. Authors are allowed to delete the post and use html code here (e.g. to provide some useful links).||Notes:| 1. Don't post any source code here.| 2. Please be careful, leave short comments only. Don't spam here.| 3. For more discussion (hints, ideas, solutions) please visit our forum.| 4. Authors are allowed to delete the post and use html code here (e.g. to provide some useful links).||Notes:| 1. Don't post any source code here.| 2. Please be careful, leave short comments only. Don't spam here.| 3. For more discussion (hints, ideas, solutions) please visit our forum.| 4. Authors are allowed to delete the post and use html code here (e.g. to provide some useful links).| |
||||||
2019-12-22 05:42:14
|Notes:| 1. Don't post any source code here.| 2. Please be careful, leave short comments only. Don't spam here.| 3. For more discussion (hints, ideas, solutions) please visit our forum.| 4. Authors are allowed to delete the post and use html code here (e.g. to provide some useful links).| |
||||||
2019-12-04 12:16:03
#include <cstdio> using namespace std; int main() { int a[1005],high=0,low=0; int n=1; while(scanf("%d",&a[n])!=EOF) n++; n--; for(int i=2;i<n;i++){ if(a[i-1]<a[i] && a[i+1]<a[i]){ high++; } if(a[i-1]>a[i] && a[i+1]>a[i]){ low++; } } printf("%d %d",high,low); } |
||||||
2019-11-06 04:13:53
dogii liitle pussy ass |
||||||
2019-07-11 10:13:01
oroltiig ni yaj hiihuu |
||||||
2019-04-08 09:39:10
hha ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
||||||
2019-04-07 12:34:35
(~'_')~ ~('_'~) Last edit: 2019-04-07 12:35:46 |
||||||
2019-04-05 11:24:37
endees huulah gesen bol mai!!!! ||| ||| ||| |||||||||| |||||||||| |||||||||||||||| ||||||| |