├── Again Twenty Five!.c ├── Anton and Danik.c ├── Bear and Big Brother.c ├── Bit++.c ├── Boy or Girl.c ├── Calculating Function.c ├── Divisibility Problem.c ├── Domino piling.c ├── Even Odds.c ├── George and Accommodation.c ├── HQ9+.c ├── Helpful Maths.c ├── Hulk.c ├── Learn from Math.c ├── Mood.c ├── Nearly Lucky Number.c ├── Next Round.c ├── Petya and Strings.c ├── Soft Drinking.c ├── Soldier and Bananas.c ├── Sum.c ├── Team.c ├── Toy Trucks.c ├── Translation.c ├── Turtle and Good Strings.c ├── Twins.c ├── Un ballon de foot.c ├── Watermelon.c ├── Way Too Long Words.c ├── Word Capitalization.c ├── Word.c ├── Wrong Subtraction.c ├── YES or YES.c ├── bin └── Debug │ └── codeforces.exe ├── codeforces.cbp ├── codeforces.depend ├── codeforces.layout ├── main.c └── obj └── Debug ├── Bit++.o ├── Domino piling.o ├── Next Round.o ├── Petya and Strings.o ├── Team.o ├── Twins.o ├── Un ballon de foot.o ├── Watermelon.o └── Way Too Long Words.o /Again Twenty Five!.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | long long int n; 5 | scanf("%lld",&n); 6 | printf("25\n"); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /Anton and Danik.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | char s[100000]; 6 | long long int n,a=0,d=0; 7 | scanf("%lld",&n); 8 | scanf("%s",s); 9 | for(int i=0;id) 21 | { 22 | printf("Anton"); 23 | } 24 | else if(a 2 | int main() 3 | { 4 | int a,b,nb=0; 5 | scanf("%d %d",&a,&b); 6 | while(a<=b) 7 | { 8 | a*=3; 9 | b*=2; 10 | nb++; 11 | } 12 | printf("%d",nb); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /Bit++.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int n, X=0; 6 | char ch[4]; 7 | scanf("%d",&n); 8 | for(int i=0; i 2 | #include 3 | int main() 4 | { 5 | char ch[100]; 6 | char tab[100]; 7 | int nb=0,j; 8 | scanf("%s",ch); 9 | for(int i=0;i 2 | int main() 3 | { 4 | long long int n,f=0; 5 | scanf("%I64d",&n); 6 | if(n%2==0) 7 | { 8 | f=n/2; 9 | } 10 | else 11 | { 12 | f=-((n/2)+1); 13 | } 14 | printf("%I64d",f); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /Divisibility Problem.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int t; 5 | long long int a,b,nb; 6 | scanf("%d",&t); 7 | for(int i=0;i 2 | int main() 3 | { 4 | int M,N,s; 5 | scanf("%d %d",&N,&M); 6 | s=N*M; 7 | printf("%d",s/2); 8 | return 0; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Even Odds.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | long long int n, k; 5 | scanf("%lld %lld", &n, &k); 6 | 7 | long long int total_pairs = n / 2; 8 | long long int total_impairs = n - total_pairs; 9 | if (k <= total_impairs) { 10 | printf("%lld\n", 2 * k - 1); 11 | } else { 12 | k -= total_impairs; 13 | printf("%lld\n", 2 * k); 14 | } 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /George and Accommodation.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int n,p,q,nb=0; 5 | scanf("%d",&n); 6 | for(int i=0;i=2) 10 | { 11 | nb++; 12 | } 13 | } 14 | printf("%d",nb); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /HQ9+.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | char p[102]; 6 | int valide=0; 7 | scanf("%s",p); 8 | for(int i=0;i 2 | #include 3 | int main() 4 | { 5 | char ch[100]; 6 | scanf("%s",ch); 7 | int i,j,aux,k=0; 8 | int tab[100]; 9 | j=0; 10 | for(i=0;i= 0 && tab[k] > aux) { 22 | tab[k + 1] = tab[k]; 23 | k--; 24 | } 25 | tab[k + 1] = aux; 26 | } 27 | for(i=0;i 2 | #include 3 | int main() 4 | { 5 | int n; 6 | scanf("%d",&n); 7 | if(n==1) 8 | { 9 | printf("I hate it"); 10 | } 11 | 12 | else if(n>1) 13 | { 14 | printf("I hate that"); 15 | for(int i=2;i1) 27 | { 28 | printf(" I love it"); 29 | } 30 | else 31 | { 32 | printf(" I hate it"); 33 | } 34 | } 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /Learn from Math.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int is_composite(long long int num) { 4 | if (num <= 1) return 0; 5 | for (long long int i = 2; i * i <= num; i++) { 6 | if (num % i == 0) return 1; 7 | } 8 | return 0; 9 | } 10 | 11 | int main() { 12 | long long int n, x, y; 13 | scanf("%lld", &n); 14 | x = n / 2; 15 | y = n - x; 16 | while (!is_composite(x) || !is_composite(y)) { 17 | x--; 18 | y++; 19 | } 20 | 21 | printf("%lld %lld", x, y); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Mood.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int t,x,y; 5 | scanf("%d",&t); 6 | while(t--) 7 | { 8 | scanf("%d%d",&x,&y); 9 | if(y>x) 10 | { 11 | printf("%d\n",y-x); 12 | } 13 | else 14 | { 15 | printf("0\n"); 16 | } 17 | } 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /Nearly Lucky Number.c: -------------------------------------------------------------------------------- 1 | #include 2 | int islucky(int number) 3 | { 4 | if (number == 0) return 0; 5 | while(number!=0) 6 | { 7 | int unite= number%10; 8 | if(unite!=4 && unite!=7) 9 | { 10 | return 0; 11 | } 12 | number=number/10; 13 | } 14 | return 1; 15 | } 16 | int main() 17 | { 18 | long long n; 19 | int k,nb=0; 20 | scanf("%lld474404774",&n); 21 | while(n!=0) 22 | { 23 | k=n%10; 24 | if(k==4 || k==7) 25 | { 26 | nb++; 27 | } 28 | n=n/10; 29 | 30 | } 31 | if(islucky(nb)) 32 | { 33 | printf("YES"); 34 | } 35 | else 36 | { 37 | printf("NO"); 38 | } 39 | 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /Next Round.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int n,k,res=0,T[100]; 5 | scanf ("%d %d", &n,&k); 6 | 7 | for(int i=0; i=T[k-1]) && (T[i]>0)) 15 | { 16 | res++; 17 | } 18 | } 19 | 20 | printf("%d",res); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Petya and Strings.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | char ch1[100],ch2[100]; 6 | scanf("%s\n%s",ch1,ch2); 7 | for(int i=0;ch1[i]!='\0';i++) 8 | { 9 | ch1[i]=tolower(ch1[i]); 10 | } 11 | for(int i=0;ch2[i]!='\0';i++) 12 | { 13 | ch2[i]=tolower(ch2[i]); 14 | } 15 | if(strcmp(ch1,ch2)==0) 16 | { 17 | printf("0"); 18 | } 19 | else if(strcmp(ch1,ch2)<0) 20 | { 21 | printf("-1"); 22 | } 23 | else 24 | { 25 | printf("1"); 26 | } 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /Soft Drinking.c: -------------------------------------------------------------------------------- 1 | #include 2 | int min(int a, int b) { 3 | return (a < b) ? a : b; 4 | } 5 | 6 | int min_of_three(int a, int b, int c) { 7 | return min(min(a, b), c); 8 | } 9 | int main() 10 | { 11 | int n,k,l,c,d,p,nl,np,millilitres,toastsb,toastsc,toastss,res; 12 | scanf("%d%d%d%d%d%d%d%d",&n,&k,&l,&c,&d,&p,&nl,&np); 13 | millilitres=k*l; 14 | toastsb=millilitres/nl; 15 | toastsc=c*d; 16 | toastss=p/np; 17 | res=(min_of_three(toastsb,toastsc,toastss))/n; 18 | printf("%d",res); 19 | return 0; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Soldier and Bananas.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int w,n,k,i,nb=0; 5 | scanf("%d%d%d",&k,&n,&w); 6 | for(i=1;i<=w;i++) 7 | { 8 | nb=nb+(k*i); 9 | } 10 | if(n>=nb || w<=1) 11 | { 12 | printf("0"); 13 | } 14 | else 15 | { 16 | printf("%d",nb-n); 17 | } 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /Sum.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | long long int t; 5 | int a,b,c; 6 | scanf("%lld",&t); 7 | while(t--) 8 | { 9 | scanf("%d%d%d",&a,&b,&c); 10 | if((a==b+c)||(b==a+c)||(c==a+b)) 11 | { 12 | printf("YES\n"); 13 | } 14 | else 15 | { 16 | printf("NO\n"); 17 | } 18 | } 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /Team.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int n,a,b,c,res,nb=0;; 6 | 7 | scanf("%d",&n); 8 | for (int i=0;i=2) 14 | { 15 | nb++; 16 | } 17 | } 18 | printf("%d",nb); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /Toy Trucks.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int L; 5 | scanf("%d",&L); 6 | if(L<=10) 7 | { 8 | printf("YES"); 9 | } 10 | else 11 | { 12 | printf("NO"); 13 | } 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /Translation.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() { 5 | char s[102], t[102]; 6 | int valide = 1; 7 | scanf("%s %s", s, t); 8 | 9 | int len_s = strlen(s); 10 | int len_t = strlen(t); 11 | 12 | if (len_s != len_t) { 13 | valide = 0; 14 | } else { 15 | for (int i = 0; i < len_s; i++) { 16 | if (s[i] != t[len_t - i -1]) { 17 | valide = 0; 18 | break; 19 | } 20 | } 21 | } 22 | 23 | if (valide) { 24 | printf("YES"); 25 | } else { 26 | printf("NO"); 27 | } 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /Turtle and Good Strings.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | int t,n; 6 | char s[102]; 7 | scanf("%d",&t); 8 | while(t--) 9 | { 10 | scanf("%d",&n); 11 | scanf("%s",s); 12 | if(s[0]==s[n-1]) 13 | { 14 | printf("No\n"); 15 | } 16 | else 17 | { 18 | printf("YES\n"); 19 | } 20 | } 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /Twins.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int n,nb=0,i,som=0,j,aux,ans=0; 5 | int t[100]; 6 | scanf("%d",&n); 7 | for(i=0;i=0 && t[j]>aux) 17 | { 18 | t[j+1]=t[j]; 19 | j=j-1; 20 | } 21 | t[j+1]=aux; 22 | } 23 | for(i=n-1;i>=0;i--) 24 | { 25 | ans+=t[i]; 26 | nb++; 27 | if(ans>som/2) 28 | { 29 | break; 30 | } 31 | } 32 | printf("%d\n",nb); 33 | return 0; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /Un ballon de foot.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | char ch[100]; 6 | int res=1; 7 | scanf("%s",ch); 8 | for(int i=0;ch[i]!='\0';i++) 9 | { 10 | if(ch[i]==ch[i+1]) 11 | { 12 | res++; 13 | if(res==7) 14 | { 15 | printf("YES"); 16 | break; 17 | } 18 | 19 | } 20 | else 21 | { 22 | res=1; 23 | } 24 | 25 | } 26 | if(res<7) 27 | { 28 | printf("NO"); 29 | } 30 | 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /Watermelon.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | int k; 6 | scanf("%d",&k); 7 | if(k%2==0&&k!=2) 8 | { 9 | printf("YES"); 10 | } 11 | else 12 | { 13 | printf("NO"); 14 | } 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /Way Too Long Words.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayalamouchi/codeForces-/12c7cdea6e64d19a50a4529a0f9109a48abd8c28/Way Too Long Words.c -------------------------------------------------------------------------------- /Word Capitalization.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | char ch[1000]; 6 | scanf("%s",ch); 7 | if(islower(ch[0])) 8 | { 9 | ch[0]=toupper(ch[0]); 10 | } 11 | printf("%s",ch); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /Word.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | char ch[100]; 6 | int min=0,maj=0; 7 | scanf("%s",ch); 8 | for(int i=0;imin) 22 | { 23 | ch[i]=toupper(ch[i]); 24 | } 25 | else 26 | { 27 | ch[i]=tolower(ch[i]); 28 | } 29 | } 30 | printf("%s",ch); 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /Wrong Subtraction.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int n,k,i; 5 | scanf("%d %d",&n,&k); 6 | for(i=0;i 2 | #include 3 | #include 4 | int main() 5 | { 6 | int t; 7 | char s[5]; 8 | scanf("%d",&t); 9 | while(t--) 10 | { 11 | scanf("%s",s); 12 | for(int i=0;i 2 | 3 | 4 | 5 | 81 | 82 | -------------------------------------------------------------------------------- /codeforces.depend: -------------------------------------------------------------------------------- 1 | # depslib dependency file v1.0 2 | 1719921765 source:c:\users\hp\desktop\codeforces\watermelon.c 3 | 4 | 5 | 6 | 1721400708 source:c:\users\hp\desktop\codeforces\way too long words.c 7 | 8 | 9 | 10 | 1721487013 source:c:\users\hp\desktop\codeforces\next round.c 11 | 12 | 13 | 1721489614 source:c:\users\hp\desktop\codeforces\domino piling.c 14 | 15 | 16 | 1721557714 source:c:\users\hp\desktop\codeforces\petya and strings.c 17 | 18 | 19 | 20 | 1721561036 source:c:\users\hp\desktop\codeforces\un ballon de foot.c 21 | 22 | 23 | 24 | 1721572540 source:c:\users\hp\desktop\codeforces\twins.c 25 | 26 | 27 | -------------------------------------------------------------------------------- /codeforces.layout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | printf("Hello world!\n"); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /obj/Debug/Bit++.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayalamouchi/codeForces-/12c7cdea6e64d19a50a4529a0f9109a48abd8c28/obj/Debug/Bit++.o -------------------------------------------------------------------------------- /obj/Debug/Domino piling.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayalamouchi/codeForces-/12c7cdea6e64d19a50a4529a0f9109a48abd8c28/obj/Debug/Domino piling.o -------------------------------------------------------------------------------- /obj/Debug/Next Round.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayalamouchi/codeForces-/12c7cdea6e64d19a50a4529a0f9109a48abd8c28/obj/Debug/Next Round.o -------------------------------------------------------------------------------- /obj/Debug/Petya and Strings.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayalamouchi/codeForces-/12c7cdea6e64d19a50a4529a0f9109a48abd8c28/obj/Debug/Petya and Strings.o -------------------------------------------------------------------------------- /obj/Debug/Team.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayalamouchi/codeForces-/12c7cdea6e64d19a50a4529a0f9109a48abd8c28/obj/Debug/Team.o -------------------------------------------------------------------------------- /obj/Debug/Twins.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayalamouchi/codeForces-/12c7cdea6e64d19a50a4529a0f9109a48abd8c28/obj/Debug/Twins.o -------------------------------------------------------------------------------- /obj/Debug/Un ballon de foot.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayalamouchi/codeForces-/12c7cdea6e64d19a50a4529a0f9109a48abd8c28/obj/Debug/Un ballon de foot.o -------------------------------------------------------------------------------- /obj/Debug/Watermelon.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayalamouchi/codeForces-/12c7cdea6e64d19a50a4529a0f9109a48abd8c28/obj/Debug/Watermelon.o -------------------------------------------------------------------------------- /obj/Debug/Way Too Long Words.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayalamouchi/codeForces-/12c7cdea6e64d19a50a4529a0f9109a48abd8c28/obj/Debug/Way Too Long Words.o --------------------------------------------------------------------------------