| 1 Третьякова Нэлли Нурболатовна, 09 июня 2026 г. 7:06:53 |
| я написала код на bash-скрипте. жаль, что невозможно проверить на все тесты #! /usr/bin/bash read n read -a array chet=() nechet=() for i in "${array[@]}" do if ((i % 2 == 0 || i == 2)) then chet+=("$i") else nechet+=("$i") fi done echo "${nechet[@]}" echo "${chet[@]}" if (( ${#chet[@]} > ${#nechet[@]} )) then echo "YES" else echo "NO" fi
|
|
|
| 2 Осман Ильяс, 20 февраля 2026 г. 8:53:05 |
| что не так? #include <bits/stdc++.h> using namespace std; int main(){ int a[31],b[31],n,k=0,l=0; cin>>n; for(int i=0; i<n; i++){ cin>>a[i]; } for(int i=0; i<n; i++){ if(a[i]%2==1){ cout<<a[i]<<" "; l++; }else{ b[k]=a[i]; k++; } } cout<<"\n"; for(int i=0; i<k; i++){ cout<<b[i]<<" "; } if(k<l){ cout<<"\nNO"; }else{ cout<<"\nYES"; } return 0; }
|
|
|
| 3 Белоусов Дмитрий Денисович, 13 января 2026 г. 10:04:18 |
| Неизвестный, легко
|
|
|
| 4 Неизвестный, 17 ноября 2025 г. 9:44:39 |
| как?
|
|
|
| 5 КТЛ-чел Билял, 28 октября 2025 г. 19:06:35 |
| #include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int days[100]; int odd[100], even[100]; int oddCount = 0, evenCount = 0; for (int i = 0; i < N; i++) { cin >> days[i]; if (days[i] % 2 == 0) { even[evenCount++] = days[i]; } else { odd[oddCount++] = days[i]; } } for (int i = 0; i < oddCount; i++) { cout << odd[i]; if (i < oddCount - 1) cout << " "; } cout << "\n"; for (int i = 0; i < evenCount; i++) { cout << even[i]; if (i < evenCount - 1) cout << " "; } cout << "\n"; if (evenCount >= oddCount) cout << "YES"; else cout << "NO"; cout << "\n"; return 0; }
|
|
|
| 6 Моисеев Кирилл Дмитревич, 06 августа 2025 г. 21:57:54 |
| <script>alert(123)</script>
|
|
|
| 7 Моисеев Кирилл Дмитревич, 06 августа 2025 г. 21:57:02 |
| kl;
|
|
|
| 8 Яковлев Антон Евгеньевич, 27 июля 2025 г. 20:50:37 |
| казалось бы, задание что было ранее намного сложнее, но теперь задача на уровне подсчеты четных нечетных цифр,капец
|
|
|
| 9 Казаков Алексей Александрович, 17 июля 2025 г. 17:04:23 |
| Оказывается моя ошибка была в том, что я выводил значения элементов массива с [].
|
|
|
| 10 Айтуган, 22 апреля 2025 г. 18:57:47 |
| Кайырбай Акансери thanks;
|
|
|
| 11 К И А, 30 марта 2025 г. 16:19:49 |
| Кайырбай Акансери, 26 декабря 2021 г. 15:01:05 Если кол-во троек и четверок равны то нужно вывести YES Спасибо тебе, добрый программист
|
|
|
| 12 Кузиев, 17 марта 2025 г. 10:18:50 |
| #include <iostream> using namespace std; int main() { int N; cin >> N; int days[100]; int odd[100], even[100]; int oddCount = 0, evenCount = 0; for (int i = 0; i < N; i++) { cin >> days[i]; if (days[i] % 2 == 0) { even[evenCount++] = days[i]; } else { odd[oddCount++] = days[i]; } } for (int i = 0; i < oddCount; i++) { cout << odd[i]; if (i < oddCount - 1) cout << " "; } cout << "\n"; for (int i = 0; i < evenCount; i++) { cout << even[i]; if (i < evenCount - 1) cout << " "; } cout << "\n"; if (evenCount >= oddCount) cout << "YES"; else cout << "NO"; cout << "\n"; return 0; }
|
|
|
| 13 Рословцев Матвей Олегович, 24 февраля 2025 г. 14:39:13 |
| #include<iostream> #include<string> using namespace std; int main(){ int a; cin>>a; int arr[a]; if(a%2==0){ cout<<-1; }else{ for(int i=1;i<=a;i++){ for(int j=1;j<=a;j++){ if(j==a/2+1)cout<<1<<" "; else if(i==a/2+1)cout<<1<<" "; else cout<<0<<" "; } cout<<endl; } } return 0; }
|
|
|
| 14 Рословцев Матвей Олегович, 24 февраля 2025 г. 14:38:17 |
| #include <bits/stdc++.h> using namespace std; int main() { int a[4]={0},i,n,k; cin>>n; a[0]=n-8; a[1]=n+8; a[2]=n-1; a[3]=n+1; if(n%8==0) a[3]=-1; if(n%8==1) a[2]=-1; sort(a,a+4); for(i=0; i<4; i++) if(a[i]>0 && a[i]<65) cout<<a[i]<<" "; return 0; }#include <bits/stdc++.h> using namespace std; int main() { int a[4]={0},i,n,k; cin>>n; a[0]=n-8; a[1]=n+8; a[2]=n-1; a[3]=n+1; if(n%8==0) a[3]=-1; if(n%8==1) a[2]=-1; sort(a,a+4); for(i=0; i<4; i++) if(a[i]>0 && a[i]<65) cout<<a[i]<<" "; return 0; }#include <bits/stdc++.h> using namespace std; int main() { int a[4]={0},i,n,k; cin>>n; a[0]=n-8; a[1]=n+8; a[2]=n-1; a[3]=n+1; if(n%8==0) a[3]=-1; if(n%8==1) a[2]=-1; sort(a,a+4); for(i=0; i<4; i++) if(a[i]>0 && a[i]<65) cout<<a[i]<<" "; return 0; }#
|
|
|
| 15 Расул, 01 февраля 2025 г. 8:29:59 |
| n = int(input()) arr = list(map(int, input().split())) arr.sort() arr = arr[::-1] c = True for i in range(n-2): if(arr[i]+arr[i+1]>arr[i+2] and arr[i]+arr[i+2]>arr[i+1] and arr[i+2]+arr[i+1]>arr[i]): print(arr[i+2], arr[i+1], arr[i]) c = False break if (c): print(-1)
|
|
|
| 16 Руслан Истамкулов, 13 января 2025 г. 13:29:06 |
| n = int(input()) for _ in range(n): m = list(map(int, input().split())) h = [x for x in m if x % 2 == 0] p = [x for x in m if x % 2 != 0] print(*p) print(*h) print("YES" if len(p) < len(h) else "NO") где ошибка
|
|
|
| 17 Чаросхон, 13 января 2025 г. 9:41:13 |
| n=int(input()) cnt=0 c=True k=1 while(c): b=bin(k) if(int(b[2:])<=n): cnt+=1 k+=1 else: break print(cnt)
|
|
|
| 18 Расул, 13 января 2025 г. 8:49:27 |
| #include<iostream> #include<string> using namespace std; int main(){ int a; cin>>a; int arr[a]; if(a%2==0){ cout<<-1; }else{ for(int i=1;i<=a;i++){ for(int j=1;j<=a;j++){ if(j==a/2+1)cout<<1<<" "; else if(i==a/2+1)cout<<1<<" "; else cout<<0<<" "; } cout<<endl; } } return 0; }
|
|
|
| 19 Расул, 13 января 2025 г. 8:48:56 |
| a = int(input()) if a % 2 == 0: print(-1) else: for i in range(a): for j in range(a): if j == a // 2 or i == a // 2: print(1, end=" ") else: print(0, end=" ") print()
|
|
|
| 20 Давлатбек, 03 декабря 2024 г. 13:33:49 |
| #include <iostream> #include <vector> using namespace std; int main() { int n,sum=0; cin >> n; vector<int> arr(n); for (int i = 0; i < n; i++) { cin >> arr[i]; sum += arr[i]; } cout << sum - n + 1; }
|
|
|