HOC24
Lớp học
Môn học
Chủ đề / Chương
Bài học
Áp dụng dãy tỉ số bằng nhau:
`hat(A)/2 = hat(B)/3 = hat(C)/7 = (hat A + hat B + hat C)/(2+3+7) = 180/12 = 15`
`hat(A)/2 = 15 => hat(A) = 30^@`
`hat(B)/3 = 15 => hat(B) = 45^@`
`hat(C)/7 = 15 => hat(C) = 105^@`.
#h24cfs_796: Hi b, mình là Sunshine hồi trước nà. Vẫn có bạn nhớ đến mình hah. Hóng b comeback vào ngày k xa:D
#include <bits/stdc++.h>using namespace std;#define pll pair<int, int>#define plll pair<int, pll>#define tr cout << "-----------------" << '\n';#define ll int#define nmax 3000007#define mmax 2007#define pb push_backconst int mod = 1e9 + 7;const int oo = 1e17;const int base = 41;const int dx[] = {0, 0, 1, -1};const int dy[] = {1, -1, 0, 0};long long a[nmax];signed main(){ cin.tie(0)->sync_with_stdio(0); long long n; cin >> n; for(int i = 1; i <= n; i++) { cin >> a[i]; } long long dem = 0; for(int i = 1; i < n; i++) { if((a[i] + a[i + 1]) % 4 == 0) dem++; } cout << dem;}
:>
time 2 say gbye :D