#include <stdio.h>
#include <windows.h>
#define _MAX_STRING_SIZE_ 100
int main()
{
SetConsoleOutputCP(65001);
char str[_MAX_STRING_SIZE_];
scanf("%[^\n]%*c", str);// читает строку с пробелами
int counter = 0;
for(int letter = -96; letter <= -17; letter++)// проверка первого слова // а = -96, я = -17
if(str[0] == letter)
counter++;
for(int i = 0; i < _MAX_STRING_SIZE_ - 1; i++)
if(str[i] == ' ')
for(int letter = -96; letter <= -17; letter++) // а = -96, я = -17
if((int)str[i + 1] == letter)
printf("%d", counter);
return 0;
}
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;
int absSum(vector<int> &k){
int sum = 0;
for(auto &i: k) sum += abs(i);
return sum;
void solve(){
int n, m;
cin >> n >> m;
vector<vector<int>> a(n, vector<int> (m));
for(vector<int> &i: a)
for(int &j: i)
cin >> j;
pair<int, int> ans = {absSum(a[0]), 0};
for(int i = 1; i < n; i++){
int curSum = absSum(a[i]);
if(curSum > ans.first) ans = {curSum, i};
cout << "Line #" << (ans.second + 1) << " has the biggest absolute sum: " << ans.first;
signed main() {
solve();
#include <stdio.h>
#include <windows.h>
#define _MAX_STRING_SIZE_ 100
int main()
{
SetConsoleOutputCP(65001);
char str[_MAX_STRING_SIZE_];
scanf("%[^\n]%*c", str);// читает строку с пробелами
int counter = 0;
for(int letter = -96; letter <= -17; letter++)// проверка первого слова // а = -96, я = -17
if(str[0] == letter)
counter++;
for(int i = 0; i < _MAX_STRING_SIZE_ - 1; i++)
if(str[i] == ' ')
for(int letter = -96; letter <= -17; letter++) // а = -96, я = -17
if((int)str[i + 1] == letter)
counter++;
printf("%d", counter);
return 0;
}
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;
int absSum(vector<int> &k){
int sum = 0;
for(auto &i: k) sum += abs(i);
return sum;
}
void solve(){
int n, m;
cin >> n >> m;
vector<vector<int>> a(n, vector<int> (m));
for(vector<int> &i: a)
for(int &j: i)
cin >> j;
pair<int, int> ans = {absSum(a[0]), 0};
for(int i = 1; i < n; i++){
int curSum = absSum(a[i]);
if(curSum > ans.first) ans = {curSum, i};
}
cout << "Line #" << (ans.second + 1) << " has the biggest absolute sum: " << ans.first;
}
signed main() {
solve();
}