├── A sparse matrix.cpp ├── Binary search on array.py ├── Check Armstrong number.cpp ├── Check bit.cpp ├── Compress a string.py ├── Compute N!.cpp ├── Compute a power b.cpp ├── Compute area of rectangle.cpp ├── Compute fibonacci number.cpp ├── Count vowels and consonants.cpp ├── Cubes sum.cpp ├── Digits in a string.cpp ├── Digits sum.py ├── Find duplicate element in array.cpp ├── Harshad numbers.cpp ├── Hollow rectangle pattern.cpp ├── Inverted pyramid pattern.cpp ├── LICENSE ├── Letter repetition.cpp ├── Letters of the alphabet.cpp ├── Linear search on array.py ├── Long factorial.cpp ├── Matrix Row Sum.cpp ├── Matrix column sum.cpp ├── Max element in the array.cpp ├── Narcissistic numbers.cpp ├── Natural numbers sum.cpp ├── Number of multiples.cpp ├── Number reverse.cpp ├── Occurrence of a character.cpp ├── Odd even index.cpp ├── Palindromic right-angled triangle pattern.cpp ├── Prime or not.cpp ├── Print half diamond pattern.cpp ├── Print multiplication table.cpp ├── Print pyramid pattern.cpp ├── Print unique elements of array.cpp ├── README.md ├── Rectangle pattern.cpp ├── Reverse array.cpp ├── Reverse string.cpp ├── Right-angled triangle pattern 1.cpp ├── Right-angled triangle pattern 2.cpp ├── Squares sum.cpp ├── Sum of all odd elements.cpp ├── Sum of two matrices.cpp ├── The missing number.cpp ├── Toggle case of characters.cpp ├── Transpose matrix.cpp ├── Triangle validator.cpp └── Vowels in a string.cpp /A sparse matrix.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Given a matrix of size N x M, print whether it is a sparse matrix or not. 3 | Note: If a matrix contain 0 in more than half of its cells, then it is called a sparse matrix. 4 | 5 | Input Format 6 | 7 | First line of input contains N, M - size of the matrix. Its followed by N lines each containing M intergers - elements of the matrix. 8 | 9 | Constraints 10 | 11 | 1 <= N, M <= 100 12 | 0 <= ar[i] <= 109 13 | 14 | Output Format 15 | 16 | Print "Yes" if the given matrix is a sparse matrix, otherwise print "No". 17 | 18 | Sample Input 0 19 | 20 | 2 3 21 | 5 0 0 22 | 0 8 0 23 | Sample Output 0 24 | 25 | Yes 26 | 27 | */ 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | using namespace std; 34 | 35 | 36 | int main() { 37 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 38 | int N, M; 39 | cin>>N>>M; 40 | int A[N][M]; 41 | int s = 0; 42 | for(int i=0; i>A[i][j]; 47 | if(A[i][j] == 0) 48 | { 49 | s++; 50 | } 51 | } 52 | } 53 | 54 | if(s > (N*M)/2) 55 | { 56 | cout<<"Yes"<=l: 35 | mid=l+(h-l)//2 36 | if arr[mid]==k: 37 | return mid 38 | elif arr[mid]>k: 39 | return BS(arr,l,mid-1,k) 40 | else: 41 | return BS(arr,mid+1,h,k) 42 | else: 43 | return -1 44 | result=BS(arr,0,n-1,k) 45 | 46 | if result!=-1: 47 | print("true") 48 | else: 49 | print("false") 50 | -------------------------------------------------------------------------------- /Check Armstrong number.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Given an integer N, check whether it's an Armstrong number or not. 3 | Note: Armstrong number is a number that is equal to the sum of cubes of its digits. 4 | 5 | Input Format 6 | 7 | First and only line of input contains a integer - N. 8 | 9 | Constraints 10 | 11 | 0 <= N <= 109 12 | 13 | Output Format 14 | 15 | Print "Yes" if the number is an Armstrong number, "No" otherwise. 16 | 17 | Sample Input 0 18 | 19 | 153 20 | Sample Output 0 21 | 22 | Yes 23 | Explanation 0 24 | 25 | 13 + 53 + 33 = 153 26 | */ 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | using namespace std; 33 | 34 | 35 | int main() { 36 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 37 | int N,s=0,r,q; 38 | cin>>N; 39 | q=N; 40 | while(q>0){ 41 | r=q%10; 42 | s=s+(r*r*r); 43 | q=q/10; 44 | } 45 | if(s==N) 46 | cout<<"Yes"< 28 | #include 29 | #include 30 | #include 31 | #include 32 | using namespace std; 33 | 34 | 35 | int main() { 36 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 37 | int N,i; 38 | int res; 39 | cin>>N>>i; 40 | res = (N >> (i)); 41 | if (res & 1) 42 | printf("true\n"); 43 | else 44 | printf("false\n"); 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /Compress a string.py: -------------------------------------------------------------------------------- 1 | #Given a string, compress the given string. See example for more details. 2 | 3 | #Input Format 4 | 5 | #Input contains a string S, consisting of lowercase and uppercase characters. 6 | 7 | #Constraints 8 | 9 | #1 <= len(S) <= 100 10 | 11 | #Output Format 12 | 13 | #Print the compressed string. 14 | 15 | #Sample Input 0 16 | 17 | #aaaBBBBhhhekkL 18 | #Sample Output 0 19 | 20 | #a3B4h3e1k2L1 21 | #Explanation 0 22 | 23 | #In the given string, a is repeating for 3 times continuosly. So after compression it becomes a3. 24 | #Similarly, 25 | #B is repeating for 4 times - B4 26 | #h is repeating for 3 times - h3 27 | #e is repeating for 1 times - e1 28 | #k is repeating for 2 times - k2 29 | #L is repeating for 1 times - L1 30 | string=str(input()) 31 | ind = 0 32 | def compress(string): 33 | global ind 34 | cstr = "" 35 | l = len(string) 36 | while (ind != l): 37 | count = 1 38 | 39 | while ((ind < (l-1)) and (string[ind] == string[ind+1])): 40 | count = count + 1 41 | ind = ind + 1 42 | 43 | 44 | else: 45 | cstr = cstr + str(string[ind]) + str(count) 46 | 47 | ind += 1 48 | 49 | return cstr 50 | 51 | print(compress(string)) 52 | -------------------------------------------------------------------------------- /Compute N!.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Given a non-negative number - N, print N! 3 | 4 | Input Format 5 | 6 | First and only line of input contains a number - N. 7 | 8 | Constraints 9 | 10 | 0 <= N <= 10 11 | 12 | Output Format 13 | 14 | Print factorial of N. 15 | 16 | Sample Input 0 17 | 18 | 5 19 | Sample Output 0 20 | 21 | 120 22 | Explanation 0 23 | 24 | Self Explanatory 25 | 26 | */ 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | using namespace std; 33 | 34 | 35 | int main() { 36 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 37 | int N,f=1; 38 | cin>>N; 39 | for(int i=1;i<=N;i++){ 40 | f=f*i; 41 | } 42 | cout< 29 | #include 30 | #include 31 | #include 32 | #include 33 | using namespace std; 34 | 35 | 36 | int main() { 37 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 38 | long long a,b,f=1; 39 | cin>>a>>b; 40 | for(int i=1;i<=b;i++){ 41 | f=f*a; 42 | } 43 | cout< 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | long long L,B; 37 | cin>>L; 38 | cin>>B; 39 | cout< 30 | #include 31 | #include 32 | #include 33 | #include 34 | using namespace std; 35 | 36 | 37 | 38 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 39 | int fR(int N) 40 | { 41 | if (N <= 1) 42 | return N; 43 | return fR(N - 1) + fR(N - 2); 44 | } 45 | int main() 46 | { 47 | int N; 48 | cin>>N; 49 | cout< 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | using namespace std; 34 | 35 | 36 | int main() { 37 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 38 | string s; 39 | cin>>s; 40 | int l=s.length(); 41 | int v=0,c=0; 42 | for(int i=0;i 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | int N,s=0; 37 | cin>>N; 38 | for(int i=1;i<=N;i++){ 39 | s+=i*i*i; 40 | } 41 | cout< 37 | #include 38 | #include 39 | #include 40 | #include 41 | using namespace std; 42 | 43 | 44 | 45 | int allDigits(string str, int len) 46 | { 47 | int c=0; 48 | for (int i = 0; i < len; i++) { 49 | if (str[i] >= '0' && str[i] <= '9'){ 50 | c++; 51 | } 52 | 53 | } 54 | return c; 55 | } 56 | 57 | // Driver code 58 | int main() 59 | { 60 | string s; 61 | cin>>s; 62 | int l = s.length(); 63 | 64 | if (allDigits(s, l)==l) 65 | cout << "Yes"; 66 | else 67 | cout << "No"; 68 | 69 | return 0; 70 | } 71 | -------------------------------------------------------------------------------- /Digits sum.py: -------------------------------------------------------------------------------- 1 | # Given a non-negative integer - N, print the sum of digits of the given number. 2 | 3 | #Input Format 4 | 5 | #First and only line of input contains a non-negative integer N. 6 | 7 | #Constraints 8 | 9 | #0 <= length(N) <= 103 10 | 11 | #Output Format 12 | 13 | #Print the sum of digits of the given number. 14 | 15 | #Sample Input 0 16 | 17 | #164 18 | #Sample Output 0 19 | 20 | #11 21 | #Explanation 0 22 | 23 | #Self Explanatory 24 | n=int(input()) 25 | s=0 26 | while(n>0): 27 | s=s+n%10 28 | n=n//10 29 | 30 | print(s) 31 | 32 | 33 | -------------------------------------------------------------------------------- /Find duplicate element in array.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Find a duplicate element in the given array of integers. There will be only a single duplicate element in the array. 3 | Note: Do not use any inbuilt functions/libraries for your main logic. 4 | 5 | Input Format 6 | 7 | First line of input contains size of the array - N and second line contains the elements of the array. 8 | 9 | Constraints 10 | 11 | 2 <= N <= 100 12 | 0 <= ar[i] <= 109 13 | 14 | Output Format 15 | 16 | Print the duplicate element from the given array. 17 | 18 | Sample Input 0 19 | 20 | 6 21 | 5 4 10 9 21 10 22 | Sample Output 0 23 | 24 | 10 25 | */ 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | int i,j,N; 37 | cin>>N; 38 | int A[N]; 39 | for(i=0;i>A[i]; 42 | } 43 | for(i=0; i 30 | #include 31 | #include 32 | #include 33 | #include 34 | using namespace std; 35 | 36 | 37 | int main() { 38 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 39 | int N,q,r,s=0; 40 | cin>>N; 41 | q=N; 42 | while(q>0){ 43 | r=q%10; 44 | s=s+r; 45 | q=q/10; 46 | } 47 | if(N%s==0) 48 | cout<<"Yes"< 31 | #include 32 | #include 33 | #include 34 | #include 35 | using namespace std; 36 | 37 | 38 | int main() { 39 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 40 | int W,L; 41 | cin>>W>>L; 42 | for(int i=1;i<=L;i++){ 43 | for(int j=1;j<=W;j++){ 44 | if(i==1||i==L||j==1||j==W){ 45 | cout<<"*"; 46 | } 47 | else{ 48 | cout<<" "; 49 | } 50 | } 51 | cout< 31 | #include 32 | #include 33 | #include 34 | #include 35 | using namespace std; 36 | 37 | 38 | int main() { 39 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 40 | int N; 41 | cin>>N; 42 | for(int i=N;i>0;i--) 43 | { 44 | if(i==1 || i==N) 45 | for(int j=1;j<=i;j++) 46 | { 47 | cout<<"* "; 48 | } 49 | 50 | else 51 | { 52 | for(int j=1;j<=i;j++) 53 | { 54 | if(j==1 || j==i) 55 | cout<<"* "; 56 | else 57 | cout<<" "; 58 | } 59 | } 60 | cout< 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | int N; 37 | cin>>N; 38 | cout<<"G"; 39 | for(int i=0;i 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | using namespace std; 33 | 34 | string uniqueChar(string str) { 35 | // Write your code here 36 | int d=str.length(); 37 | for(int i = 0;i charCount; 43 | string ans; 44 | for(int i = 0;i>s; 60 | int d=0; 61 | int l=s.length(); 62 | s=uniqueChar(s); 63 | l=s.length(); 64 | for(int i=0;i='a'&& s[i]<='z')){ 66 | d++; 67 | } 68 | } 69 | if(d==26) 70 | cout<<"Yes"< 29 | #include 30 | #include 31 | #include 32 | #include 33 | using namespace std; 34 | 35 | 36 | int main() { 37 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 38 | long long f=1,N; 39 | cin>>N; 40 | for(int i=1;i<=N;i++) 41 | f=f*i; 42 | 43 | cout< 29 | #include 30 | #include 31 | #include 32 | #include 33 | using namespace std; 34 | 35 | 36 | int main() { 37 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 38 | int N,M,sum=0; 39 | cin>>N>>M; 40 | int A[N][M]; 41 | for(int i=0;i>A[i][j]; 44 | } 45 | } 46 | for(int i=0;i 29 | #include 30 | #include 31 | #include 32 | #include 33 | using namespace std; 34 | 35 | 36 | int main() { 37 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 38 | int N,M,sum=0; 39 | cin>>N>>M; 40 | int A[N][M]; 41 | for(int i=0;i>A[i][j]; 44 | } 45 | } 46 | for(int j=0;j 26 | #include 27 | #include 28 | #include 29 | #include 30 | using namespace std; 31 | 32 | 33 | int main() { 34 | int n; 35 | cin>>n; 36 | int A[n]; 37 | for(int i=0;i>A[i]; 39 | 40 | for(int i=0;i 29 | #include 30 | #include 31 | #include 32 | #include 33 | using namespace std; 34 | 35 | 36 | int main() { 37 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 38 | long long N,q; 39 | long long s=0,r; 40 | cin>>N; 41 | q=N; 42 | int d= int(log10(N) + 1); 43 | while(q != 0){ 44 | r=q%10; 45 | s=s+pow(r,d); 46 | q=q/10; 47 | } 48 | if(s==N) 49 | cout<<"Yes"< 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | int N,s=0; 37 | cin>>N; 38 | for(int i=1;i<=N;i++) 39 | s+=i; 40 | 41 | cout< 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | long long N; 37 | cin>>N; 38 | cout< 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | long long signed N,s=0; 37 | cin>>N; 38 | while(N != 0){ 39 | s=(s*10)+(N%10); 40 | N=N/10; 41 | } 42 | cout< 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | using namespace std; 34 | 35 | 36 | int main() { 37 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 38 | string s; 39 | getline(cin,s); 40 | char ch; 41 | cin>>ch; 42 | int c=0; 43 | int l=s.length(); 44 | for(int i=0;i 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | string s; 37 | cin>>s; 38 | int l=s.length(); 39 | for(int i=0;i 31 | #include 32 | #include 33 | #include 34 | #include 35 | using namespace std; 36 | 37 | 38 | int main() { 39 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 40 | int i, j, r, c=0; 41 | cin>>r; 42 | for (i = 0; i < 2*r; i=i+2) { 43 | for (j = 0; j <= i; j++) { 44 | cout< 28 | #include 29 | #include 30 | #include 31 | #include 32 | using namespace std; 33 | 34 | 35 | int main() { 36 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 37 | long long N; 38 | bool ab=false; 39 | cin>>N; 40 | if(N>1){ 41 | for(long long i=2;i 36 | #include 37 | #include 38 | #include 39 | #include 40 | using namespace std; 41 | 42 | 43 | int main() { 44 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 45 | int N; 46 | cin>>N; 47 | for(int i=0;i=0;i--){ 54 | for(int j=0;j 36 | #include 37 | #include 38 | #include 39 | #include 40 | using namespace std; 41 | 42 | 43 | int main() { 44 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 45 | int N; 46 | cin>>N; 47 | for(int i=1;i<=10;i++){ 48 | cout< 29 | #include 30 | #include 31 | #include 32 | #include 33 | using namespace std; 34 | 35 | 36 | int main() { 37 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 38 | int n,c=0; 39 | cin>>n; 40 | int A[n]; 41 | int i, j, k; 42 | for(i=0;i>A[i]; 45 | } 46 | for(i=0; i 31 | #include 32 | #include 33 | #include 34 | #include 35 | using namespace std; 36 | 37 | 38 | int main() { 39 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 40 | int N; 41 | cin>>N; 42 | for(int i=1;i<=N;i++){ 43 | for(int j=N;j>=1;j--){ 44 | if(i==j){ 45 | cout<<"*"; 46 | } 47 | else{ 48 | cout< 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | int n; 37 | cin>>n; 38 | long long A[n]; 39 | for(int i=0;i>A[i]; 41 | 42 | for(int i=(n-1);i>=0;i--) 43 | cout< 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | using namespace std; 34 | 35 | 36 | int main() { 37 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 38 | 39 | string s; 40 | cin>>s; 41 | reverse(s.begin(), s.end()); 42 | cout< 33 | #include 34 | #include 35 | #include 36 | #include 37 | using namespace std; 38 | 39 | 40 | int main() { 41 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 42 | int N,k=0; 43 | cin>>N; 44 | for(int i=0;i 31 | #include 32 | #include 33 | #include 34 | #include 35 | using namespace std; 36 | 37 | 38 | int main() { 39 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 40 | int N,v,d; 41 | cin>>N; 42 | for(int i=1;i<=N;i++){ 43 | v=i; 44 | d=N-1; 45 | for(int j=1;j<=i;j++){ 46 | cout< 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | int N,s=0; 37 | cin>>N; 38 | for(int i=1;i<=N;i++){ 39 | s+=i*i; 40 | } 41 | cout< 26 | #include 27 | #include 28 | #include 29 | #include 30 | using namespace std; 31 | 32 | 33 | int main() { 34 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 35 | int n,sum=0; 36 | cin>>n; 37 | int A[n]; 38 | for(int i=0;i>A[i]; 40 | } 41 | for(int i=0;i 31 | #include 32 | #include 33 | #include 34 | #include 35 | using namespace std; 36 | 37 | 38 | int main() { 39 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 40 | int N,M; 41 | cin>>N>>M; 42 | int A[N][M],B[N][M]; 43 | for(int i=0;i>A[i][j]; 46 | } 47 | } 48 | for(int i=0;i>B[i][j]; 51 | } 52 | } 53 | for(int i=0;i 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | int main(){ 34 | int i,arr[10000]; 35 | int temp[100]; 36 | for(int i = 0; i <= 99; i++){ 37 | cin>>arr[i]; 38 | } 39 | for(int i = 0; i <= 99; i++){ 40 | temp[i] = 0; 41 | } 42 | 43 | for(i = 0; i < 100; i++){ 44 | temp[arr[i]] = 1; 45 | } 46 | 47 | 48 | int ans=0; 49 | for (i = 0; i <= 99 ; i++) { 50 | if (temp[i] == 0) 51 | ans = i + 1; 52 | } 53 | cout << ans-1; 54 | return 0; 55 | } 56 | -------------------------------------------------------------------------------- /Toggle case of characters.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Given a string, toggle the case of each character in the given string. 3 | 4 | Input Format 5 | 6 | Input contains a string S, consisting of lowercase and uppercase characters. 7 | 8 | Constraints 9 | 10 | 1 <= len(S) <= 100 11 | 12 | Output Format 13 | 14 | Print the toggled string. 15 | 16 | Sample Input 0 17 | 18 | abdBd 19 | Sample Output 0 20 | 21 | ABDbD 22 | Explanation 0 23 | 24 | Self Explanatory 25 | */ 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | using namespace std; 33 | 34 | 35 | int main() { 36 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 37 | string s; 38 | cin>>s; 39 | int l=s.length(); 40 | for(int i=0;i 28 | #include 29 | #include 30 | #include 31 | #include 32 | using namespace std; 33 | 34 | 35 | int main() { 36 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 37 | int N,M; 38 | cin>>N>>M; 39 | int A[N][M]; 40 | for(int i=0;i>A[i][j]; 43 | } 44 | } 45 | for(int j=0;j 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | int A,B,C; 37 | cin>>A>>B>>C; 38 | if((A+B)>C&&(A+C)>B&&(B+C)>A) 39 | cout<<"Yes"< 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace std; 32 | 33 | 34 | int main() { 35 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 36 | string s; 37 | cin>>s; 38 | int l=s.length(); 39 | int v=0; 40 | for(int i=0;i