#include <iostream>
#include <string>
#include <cctype>
using namespace std;
signed main() {
string line, buff = "";
bool isPalindrome = true;
getline(cin, line);
for (int i = 0; i < line.size(); i++) {
if (isalnum(line[i]))
buff += line[i];
}
for (int i = 0; i < buff.size() / 2; ++i)
{
if (buff[i] != buff[buff.size() - i - 1])
isPalindrome = false;
break;
if (isPalindrome)
cout << "TRUE";
else
cout << "FALSE";
return 0;
#include <iostream>
#include <string>
#include <cctype>
using namespace std;
signed main() {
string line, buff = "";
bool isPalindrome = true;
getline(cin, line);
for (int i = 0; i < line.size(); i++) {
if (isalnum(line[i]))
buff += line[i];
}
for (int i = 0; i < buff.size() / 2; ++i)
{
if (buff[i] != buff[buff.size() - i - 1])
{
isPalindrome = false;
break;
}
}
if (isPalindrome)
cout << "TRUE";
else
cout << "FALSE";
return 0;
}
#include <stdio.h>
int main(void)
{float a[10][10]={0},newar[100]={0},min=2147483647;
int i,j,n,c,coucurr=1,newn=0,boo=0;
scanf("%d",&n);
for(i=0;i<n;i++)
for(j=0;j<n;j++)
{scanf("%f",&a[i][j]);
newar[newn]=a[i][j];
newn++;}
for(i=0;i<newn;i++)
{for(j=0;j<newn;j++)
if (newar[i]==newar[j] && i!=j)
coucurr++;
if (coucurr>1 && min>newar[i])
{min=newar[i]; boo=1;}
coucurr=1;}
if(boo)
printf("%f",min);
else
printf("Nothing");
return 0;}
Пример ввода:
3
1
2
2
3
3
3
4
4
4
Пример вывода:
2