Posts

codeforces 45A Solution A. Codecraft lll (codeforces 45A) (rank 900*)

 45A. Codecraft ll l Problem Link: https://codeforces.com/problemset/problem/45/A Solution 1: import   java . util . Scanner ; public   class   A45  {      public   static   Scanner   scn  =  new   Scanner ( System . in );      public   static   String []  str  = {  "January" ,  "February" ,  "March" ,  "April" ,  "May" ,  "June" ,  "July" ,  "August" ,              "September" ,  "October" ,  "November" ,  "December"  };      public   static   int   nextIdx ( int   currIdx ,  int   change ) {          return  ( currIdx  +  change ) %  12 ;     }      public   static   int  ...

codeforces 282A Solution A. Bit++ (codeforces 282A) (rank 800*)

 282A. Bit++ Problem Link: https://codeforces.com/problemset/problem/282/A Solution 1: import   java . util .*; import java.util.Scanner; public class A282 { public static int calculateFinalValue ( int n, Scanner scn) { int ans = 0 ; for ( int i = 0 ; i < n; i++) { String operation = scn.next(); if (operation.contains( "+" )) { ans++; } else { ans--; } } return ans; } public static void main (String[] args) { Scanner scn = new Scanner (System.in); int n = scn.nextInt(); System.out.println(calculateFinalValue(n, scn)); scn.close(); // Always close the scanner to avoid resource leaks } }

codeforces 263A Solution A. Beautiful Matrix (codeforces 263A) (rank 800*)

  263A.  Beautiful Matrix Problem Link: https://codeforces.com/problemset/problem/263/A Solution 1: import   java . util .*; public   class   A263  {      public   static   Scanner   scn  =  new   Scanner ( System . in );      public   static   void   input ( int [][]  arr ) {          for  ( int   i  =  0 ;  i  <  5 ;  i ++)              for  ( int   j  =  0 ;  j  <  5 ;  j ++)                  arr [ i ][ j ] =  scn . nextInt ();     }      public   static   int   TotalMoves ( int [][]  arr ) {     ...

codeforces 43D Solution D.Journey (codeforces 43D) (rank 2000*)

43D. Journey Problem Link: "https://codeforces.com/problemset/problem/43/D" Solution 1: import   java . util .*; public   class   traveseKing  {      public   static   Scanner   scn  =  new   Scanner ( System . in );        public   static   int   counter  =  0 ;        public   static   boolean   isTelepoter ( int [][]  arr ,  int   i ,  int   j ,  int   n ,  int   m ,  int   count ,  ArrayList < int []>  al ,              int [][]  dirEven ,  int [][]  dirOdd ) {          if  ( n  ==  1  &&  m  ==  1 ) {              System . out . pr...

codeforces 158A Solution Next Round (codeforces 158A) (rank 800*)

158A. Next Round Problem Link:  https://codeforces.com/problemset/problem/158/A Solution 1: import   java . util .*; public   class   A158  {      public   static   Scanner   scn  =  new   Scanner ( System . in );      public   static   int   passedStudent ( int []  arr ,  int   value ,  int   k ) {          int   counter  =  0 ;          for  ( int   i  =  0 ;  i  <  arr . length ;  i ++) {              if  ( value  <=  arr [ i ] &&  arr [ i ] >  0 )                  counter ++;        ...

UGC NET More Questions Based on C Language || Interview Questions Based On C Language

Image
  MORE C INTERVIEW QUESTIONS   1.                        What's the difference between # include "stdio.h" and # include < stdio.h > in C? 2.                        What is the difference between the array and the link list? 3.                        What is the recurrence function in C? 4.                        What's the difference between the static array and the dynamic array in C? 5.                        What's th...