Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all 40121 articles
Browse latest View live

DBFB - Editorial

$
0
0

PROBLEM LINK:

Practice

Contest

Author:anuj_2106

Tester:Suchan Park

Editorialist:Suchan Park

I wasn't aware that the actual editorialist wrote an editorial here, but anyway I decided to upload my work to avoid confusion.

DIFFICULTY:

Easy

PREREQUISITES:

Almost none, good to know properties of Fibonacci numbers

PROBLEM:

Given two sequences $A$ and $B$ with size $M$, and an integer $N$, compute the result of this code modulo $10^9 + 7$.

result := 0 for i := 1 to M for j := 1 to M array fib[1..max(2, N)] fib[1] := A[i] fib[2] := B[j] for k := 3 to N fib[k] := fib[k-1] + fib[k-2] result := result + fib[N]

QUICK EXPLANATION:

Analyze what the innermost loop is doing, and then it is easy to see that fib[N] is a linear combination of $A[i]$ and $B[j]$, and the coefficients of them form a fibonacci sequence. Then, write down the whole summation, and simplify it using the properties of summation.

EXPLANATION:

Let's first analyze the innermost part of the loop. This part adds fib[N] to result, where fib is a sequence defined by the following:

  • $fib[1] = A[i]$
  • $fib[2] = B[j]$
  • For $k \ge 3$, $fib[k] = fib[k-1] + fib[k-2]$

As you can see from the name and the form of the recurrence, it is very similar to the well-known Fibonacci sequence. The only difference is that the first two terms are $A[i]$ and $B[j]$, not 0 and 1 (or 1 and 1) as usual.

Since the recurrence only sums up the last two elements, we can see that for each $k$, we can express $fib[k]$ as

$$fib[k] = C_k \cdot A[i] + D_k \cdot B[j]$$

for some fixed constants $C_k$ and $D_k$. Let's find what $C_k$ and $D_k$ are. From the definition of the sequence,

  • $fib[1] = A[i] = 1 \cdot A[i] + 0 \cdot B[j] \rightarrow C_1 = 1, D_1 = 0$
  • $fib[2] = B[j] = 0 \cdot A[i] + 1 \cdot B[j] \rightarrow C_2 = 0, D_2 = 1$
  • For $k \ge 3$,
  • $fib[k] = fib[k-1] + fib[k-2]$
  • $= C_{k-1} \cdot A[i] + D_{k-1} \cdot B[j] + C_{k-2} \cdot A[i] + D_{k-2} \cdot B[j]$
  • $= (C_{k-1} + C_{k-2}) \cdot A[i] + (D_{k-1} + D_{k-2}) \cdot B[j]$
  • $\rightarrow C_{k} = C_{k-1} + C_{k-2}, D_{k} = D_{k-1} + D_{k-2}$

Now, using this recurrence, we are able to compute the values of $C_{N}$ and $D_{N}$ (using dynamic programming). Also, you can notice that $C_{k}$ and $D_{k}$ are successive elements of the fibonacci sequence (write down $C_{k}$ and $D_{k}$, and you will see!)

In conclusion,

$$fib[n] = C_{N} \cdot A[i] + D_{N} \cdot B[j]$$

The outer loop just iterates all $1 \le i, j \le M$ and sums up all fib[N]. Therefore, we can write the value of result as:

$$\sum_{i=1}^{M} \sum_{j=1}^{M} \{ C_{N} \cdot A[i] + D_{n} \cdot B[j]\}$$

Use the properties of $\Sigma$ to simplify the summation:

$$\begin{aligned} \sum_{i=1}^{M} \sum_{j=1}^{M} \{ C_{N} \cdot A[i] + D_{N} \cdot B[j]\} &= \sum_{i=1}^{M}\sum_{j=1}^{M} C_N \cdot A[i] + \sum_{i=1}^{M}\sum_{j=1}^{M} D_{N} \cdot B[j] \\ & = M \cdot C_{N} \cdot \sum_{i=1}^{N} A[i] + M \cdot D_{N} \cdot \sum_{j=1}^{M} B[j] \end{aligned}$$

Now, it is easy to calculate each part -- we can construct the answer using the sums of array $A$ and $B$, and the coefficients $C_{N}$ and $D_{N}$. Note that we need to keep the answer value $10^9 + 7$ during the whole computation, to avoid overflow.

AUTHOR'S AND TESTER'S SOLUTIONS:

Author's solution can be found here.

Tester's solution can be found here.

Editorialist's solution can be found here.


XORAGN - Editorial

$
0
0

PROBLEM LINK:

Practice

Contest

Author:Abishek Saini

Tester:Suchan Park

Editorialist:Suchan Park

DIFFICULTY:

Easy

PREREQUISITES:

Properties of XOR

PROBLEM:

Given an integer sequence $A_{1}, A_{2}, \cdots, A_{n}$, a new sequence $B$ is defined by:

$$B_{i\cdot N + j + 1} = A_{i+1} \oplus A_{j+1} \forall 0 \le i, j < N$$

Compute the value of $B_{1} \oplus B_{2} \oplus \cdots \oplus B_{N^2}$.

QUICK EXPLANATION:

Note that there are some duplicate elements in the sequence $B$. $B_{x \cdot N + y + 1} = A_{x} + A_{y}$, and $B_{y \cdot N + x + 1} = A_{y} + A_{x}$. Also, for any $X$, $X \oplus X = 0$ holds. Therefore, for $x \neq y$, $B_{x \cdot N + y + 1} \oplus B_{y \cdot N + x + 1} = 0$. Iterate over every $x$ and $y$, then we can see that only $B_{0 \cdot N + 0 + 1}, B_{1 \cdot N + 1 + 1}, \cdots, B_{(N-1) \cdot N + (N-1) + 1}$ are left, an the answer equals to $2A_{1} \oplus 2A_{2} \oplus \cdots \oplus 2A_{N}$.

EXPLANATION:

From the definition of the sequence $B$, let's write our goal:

$$\begin{aligned} & (& A_{1} + & A_{1}) \oplus (& A_{1} + & A_{2}) \oplus (& A_{1} \oplus & A_{3}) \oplus \cdots \oplus (& A_{1} + & A_{N-1}) \oplus (& A_{1} + & A_{N}) \\ \oplus & (& A_{2} + & A_{1}) \oplus (& A_{2} + & A_{2}) \oplus (& A_{2} \oplus & A_{3}) \oplus \cdots \oplus (& A_{2} + & A_{N-1}) \oplus (& A_{2} + & A_{N}) \\ \oplus & (& A_{3} + & A_{1}) \oplus (& A_{3} + & A_{2}) \oplus (& A_{3} \oplus & A_{3}) \oplus \cdots \oplus (& A_{3} + & A_{N-1}) \oplus (& A_{3} + & A_{N}) \\ & \cdots \\ \oplus & (& A_{N-1} + & A_{1}) \oplus (& A_{N-1} + & A_{2}) \oplus (& A_{N-1} \oplus & A_{3}) \oplus \cdots \oplus (& A_{N-1} + & A_{N-1}) \oplus (& A_{N-1} + & A_{N}) \\ \oplus & (& A_{N} + & A_{1}) \oplus (& A_{N} + & A_{2}) \oplus (& A_{N} \oplus & A_{3}) \oplus \cdots \oplus (& A_{N} + & A_{N-1}) \oplus (& A_{N} + & A_{N}) \end{aligned}$$

I wrote like this $N \times N$ matrix form, because $B$ was defined by iterating all $0 \le i, j < N$.

Let's denote the element of the $x$-th row and the $y$-th column here as $C_{x, y}$. (1-indexed)

By looking at this matrix, we can notice that the matrix is symmetric. This comes from the commutativity of additions:

$$C_{x, y} = A_{x} + A_{y} = A_{y} + A_{x} = C_{y, x}$$

So we are certain that the same elements are included twice. This is important, because for all integers $X$,

$$X \oplus X = 0$$

holds, which means

$$C_{x,y} \oplus C_{y,x} = 0.$$

Since $0 \oplus X = X$ also holds too, we can apply this formula for all $x \neq y$. The elements left will be on the diagonal.

$$\begin{aligned} (A_{1} + A_{1}) \oplus \\ & (A_{2} + A_{2}) \oplus \\ & & (A_{3} + A_{3}) \oplus \\ & & & \cdots \\ & & & & (A_{N-1} + A_{N-1}) \oplus \\ & & & & & (A_{N} + A_{N}) \end{aligned}$$

Now, it is easy to compute this value by a simple for loop.

AUTHOR'S AND TESTER'S SOLUTIONS:

Tester's solution can be found here.

Procon Junior

$
0
0

I want to know the level of the comptetion (Procon Junior to be held on 11th Aug'2018). Will it be 10th level or +2 level?

CIELRCPT - Editorial

$
0
0

PROBLEM LINK

Practice
Contest

DIFFICULTY

CAKEWALK

PREREQUISITES

Greedy Algorithms

PROBLEM

You need to find the representation of a given integer N as a sum of powers of two up to 211 with the smallest number of summands (repetitions in representation are allowed).

QUICK EXPLANATION

The problem can be solved by greedy algorithm: at each step we should take the largest possible menu that we can. To prove this noticed that if we order two equal menus, say 4 and 4, then we can order instead one menu of cost 8. In this problem you can implement this approach in any way you like but the easiest and fastest way gives the following pseudo-code:

res = 0
for i = 11 to 0
  res = res + N div 2i
  N = N mod 2i

EXPLANATION

At first we reveal the answer and then will prove it in detail. Write N as Q * 2048 + R, where Q and R are non-negative integers and R < 2048. Then the answer is Q + bitCount(R), where bitCount(X) is the number of ones in binary representation of X. If R = 2h[1] + 2h[2] + ... + 2h[K] is a binary representation of R then the optimal representation of N is N = 2048 + ... + 2048 + 2h[1] + 2h[2] + ... + 2h[K] where we have Q copies of 2048. Let’s call this approach formula approach.

Another way to come up with this answer is to use Greedy Algorithm. That is, at each step you should take the largest possible summand among {1, 2, 4, 8, ..., 2048} that is not greater than the current value of N and then subtract it from N. In fact, this problem is a special case of Change-making problem and in general it should be solved using Dynamic Programming or Integer Linear Programming but this set of coin values is special and admit using of Greedy Algorithm as we will see below.

Now we discuss why both of these approaches are correct.


1. Formula Approach.

Let’s prove that formula approach is correct. Consider some representation of N as a sum of allowed powers of two. Let there is exactly C[K] occurrences of 2K in this representation. Then we have

N = C[0] * 1 + C[1] * 2 + C[2] * 4 + ... + C[11] * 2048

Note that the total number of summands here is C[0] + C[1] + ... + C[10] + C[11]. Assume that for some K < 11 we have C[K] >=2, that is, we have at least two copies of 2K in the representation of N. Since K < 11 then the price 2K+1 is allowed. Hence we can replace two copies of 2K by one copy of 2K+1 not changing the value of sum but decreasing total number of summands. Thus, for optimal representation we should have

C[K] <= 1 for all K < 11.                         (1)

We will show that under the constraints (1) representation of N is uniquely determined. Of course this unique representation will be the optimal one.

At first note that

R = C[0] * 1 + C[1] * 2 + C[2] * 4 + ... + C[10] * 1024 <= 1 + 2 + 4 + ... + 1024 = 2047 < 2048.

Hence

2048 * C[11] <= N < 2048 * (C[11] + 1)

or

C[11] <= N / 2048 < C[11] + 1

which means by one of the definition of floor function that C[11] = floor(N / 2048) = Q. So C[11] is uniquely determined under the constraints (1) and equals to Q.

Further note that due to (1) C[10]C[9]...C[1]C[0] is a binary representation of R and hence C[0], C[1], ..., C[10] are also uniquely determined under the constraints (1).

Thus we have found this unique representation.

Next we have bitCount(R) = C[0] + C[1] + ... + C[10]. Hence the total number of summands in this representation is Q + bitCount(R) as was announced earlier. The complexity of this method is O(K), where K = 12 is the total number of powers of two that we are allowed to use.


2. Greedy Approach.

Now let’s see why greedy approach produces the same solution. Clearly at first several steps we will take the 2048 until we get a number strictly less than 2048. Then we will consider powers of two in descending order starting from 1024 and take the current power of two if it is not greater than the current value of N. It is quite clear that this process generates exactly the binary representation of N. Thus the whole representation coincides with the constructed above.

There are several ways how to implement this algorithm in this problem. First one is simple but slower in general. Namely, we have an outer loop of the form while (N > 0). Then at each iteration of this loop we simply check in one loop all allowed powers of two in descending order until we find the power of two, say 2X, that is not greater than the current value of N. After that we decrease N by 2X and increase answer by 1. The complexity of this approach is O(N / 2K-1 + K2) in the worst test case. This is because at first N / 2K-1 steps we have only one iteration of inner loop (we break at 2048) and then we have at most K steps for each of which we have at most K steps in the inner loop.

In second method we swap outer and inner loop of the first method. So we iterate over allowed powers of two in descending order and for each power of two we have an inner loop of the form while (N >= 2X) in the body of which we do the same as for the first method, that is, decrease N by 2X and increase answer by 1. The complexity of this method is O(N / 2K-1 + K). Strictly speaking the number of basic operations in this method is O(answer + K). N / 2K-1 + K is an upper bound for the answer.

Analyzing second implementation of the greedy approach it is easy to see how to make it faster. For each power of two we have the following inner loop

while N >= 2X do
  N = N - 2X
  res = res + 1

Clearly this equivalent to

  res = res + N div 2X
  N = N mod 2X

Thus we obtain third implementation of the greedy algorithm with complexity O(K).


3. Dynamic Programming Approach.

Now let’s consider another approach that allows to find the answer for arbitrary set of coin values in reasonable time. We will use dynamic programming. Let d1, ..., dK be the set of allowed coin values (they all are positive). Denote by F(P) the minimal number of coins needed to represent P by this set of coins (repetitions in representation are allowed). Clearly F(0) = 0. Consider some value of P > 0. Then it is quite clear that

F(P) = min{F(P - d1), F(P - d2), ..., F(P - dK)} + 1.            (2)

where we set for convenience F(x) = INF for x < 0 (INF is some very large number). But let’s prove this formally.

At first consider the optimal representation for P. Let it be P = A1 + ... + AL where L = F(P) and each Ai is of course equal to one of dj. Then A2 + ... + AL is some representation of P – A1 of the length L – 1. By definition of F(P – A1) we have
L – 1 >= F(P – A1)
or
F(P) >= F(P – A1) + 1.
Since A1 is equal to one of dj then
F(P – A1) >= min{F(P - d1), F(P - d2), ..., F(P - dK)}.
Combining the last two inequalities we get the first part of (1). Namely

F(P) >= min{F(P - d1), F(P - d2), ..., F(P - dK)} + 1.            (3)

Now let dj be those coin value for which F(P - dj) is minimal among F(P - d1), F(P - d2), ..., F(P - dK). Let B1, ..., BZ be the optimal representation for P - dj. That is P - dj = B1 + ... + BZ and Z = F(P – dj). But then P = dj + B1 + ... + BZ. So P has a representation of the length Z + 1 which by definition of F(P) means that

F(P) <= Z + 1 = F(P – dj) + 1 = min{F(P - d1), F(P - d2), ..., F(P - dK)} + 1.            (4)

Now (2) follows from (3) and (4). Formula (2) allows to find all values F(0), F(1), ..., F(N) in a simple double loop. So F(N) can be found in O(N * K) time with O(N + K) memory.

SETTER'S SOLUTION

Can be found here.
Setter used the third implementation of the greedy approach described above.

TESTER'S SOLUTION

Can be found here.
Tester solution has complexity O(log N) (if we replace i <= 17 by 2i<= h). In this solution he implicitly deals with more natural version of the problem where all powers of two are allowed, that is, we simply need to find bitCount(h). To get the correct answer he increase answer by 2i-11 instead of 1 for each power of two that is greater than 211 and presented in the binary expansion of h.

RELATED PROBLEMS

Greedy Change (Codeforces Beta Round #10, problem E)
Let Me Count The Ways (UVA 357)

DWNLD - Editorial

$
0
0

Problem Link:

Contest
Practice

Author:Hasan Jaddouh
Testers:Kamil Debowski
Editorialist:Hasan Jaddouh

Difficulty:

cakewalk

Pre-requisites:

none

Problem Statement:

Given a list internet speed during different times, the internet service provider charges 1 dollar per 1 MB downloaded, except for the first K minutes it was free, calculate the total cost that should be paid.

Explanation

We will describe the logic of the solution and the implementation details will be in C++

One input file contains multiple test-cases, we should process each test-case alone, so first thing we need a variable to read the number of test-cases then we make a loop to iterator over test-cases, inside it we will solve the problem for a single test-case, it's fine to output the result of one test-case before reading the rest of test-cases.

so far our code should look like this:

#include <iostream>
using namespace std;

int Tc;

int main(){
    cin>>Tc;
    for(int j=0;j<Tc;j++){
        // process a single test-case here

    }
}

for single test-case, we should read N and K, so we need two variables for them we also need a variable to store the answer (Let's name it sol) initially it has value 0. after that we should a make a loop to iterate over lists of durations and speeds, in every step in this loop we should read the duration and speed so we also need variables for them, thus so far our code is like this:

#include <iostream>
using namespace std;

int Tc;

int main(){
    cin>>Tc;
    for(int j=0;j<Tc;j++){
        // process a single test-case here
        int N,K,sol=0;
        cin>>N>>K;
        for(int j=0;j<N;j++){
            int T,D;
            cin>>T>>D;

        }
    }
}

Now, let's use the variable K as how much time remaining for free period so if T is less than K then the whole T duration will be free but K should decrease by T, otherwise if T is greater or equal to K then only first K minutes will be free so we will pay for the rest (T-K) minutes and the amount to pay will be (T-K)*D so we increase sol by it, after that we should decrease K to 0 because free period is ended

by the end of the loop we just output sol, so the full solution is:

#include <iostream>
using namespace std;

int Tc;

int main(){
    cin>>Tc;
    for(int j=0;j<Tc;j++){
        // process a single test-case here
        int N,K,sol=0;
        cin>>N>>K;
        for(int j=0;j<N;j++){
            int T,D;
            cin>>T>>D;
            if(T<K){
                K= K - T;
            } else {
                sol += (T-K)*D;
                K=0;
            }
        }
        cout<<sol<<endl;
    }
}

Author's and Tester's Solutions

Setter
Tester

what is wrong in this code

$
0
0

include<iostream>

using namespace std; int main() { long long int a,c=0; cin>>a; if(a==0) { cout<<"1"; } while(a>0) { a=a/10; c++; } if(c>0) { cout<<c; } return 0;

}

please find the mistakes in code and edit the error in the line and show me please

$
0
0

include <stdio.h>

include<conio.h>

void main() { signed char ch=`c'k;//signed char(or)simply char short int si=5; int i=6,r;//signed int(or)simply int long int li=7;//long int(or)signed long int float f=5,6,j; doouble d=7,8,l; unsigned int ui=-3; clrscr(); printf("Initialization values \nch%c\n si=%hd\n i=%d\n li=%ld\n f=%f\n d=%f\n ui=%u\n",ch,si,i,li,f,d,ui); r=89, j=32.5; k=ch; i=d; printf("assignment values \n r=%d\n j=%f\n k=%c\n i=%f\n",r,j,k,l) getch(); }

TLG:code gives correct output still ans is wrong plz help me find whats wrong in program

$
0
0

link text

Above lies the link to problem statement. I'm providing the code below, kindly help me. Thank you...

#include<stdio.h>
int main()
{
    int N=0,i=0,W=0,L=0,s=0,t=0;
    scanf("%d",&N);
    int mS=0,mT=0;
    int Si[N],Ti[N],maxS[N],maxT[N];
    for(i=0;i<N;i++)
    {
        Si[i]=0; Ti[i]=0;
        scanf("%d %d",&s,&t);
        if(i!=0)
        {
            Si[i]=Si[i-1]+s;
            Ti[i]=Ti[i-1]+t;
        }
        else
        {   Si[i]=s;
            Ti[i]=t;
        }
        if(Si[i]>Ti[i])
        {   maxS[i]=Si[i]-Ti[i];
            if(i==0)
                mS=maxS[i];
            if(i!=0 && maxS[i]>maxS[i-1])
                mS=maxS[i];
        }
        else
        {   maxT[i]=Ti[i]-Si[i];
            if(i==0)
                mT=maxT[i];
            if(i!=0 && maxT[i]>maxT[i-1])
                mT=maxT[i];
        }
    }
    if(mS>mT)
    {   W=1;L=mS;}
    else
    {   W=2;L=mT;}
    printf("%d %d",W,L);
}

Could you make Ranklist page could be more wider and simple????????

can anyone help me what is problem with this code? it is giving correct answer on dev c++ but here its shows error.

$
0
0

include<iostream>

using namespace std; main() { int t; cin>>t; while(t--) { int n; cin>>n; double loss=0; for(int i=0;i<n;i++) { int price;

        int q,discount;
        cin>>price>>q>>discount;
         double a1,a2,a3;
         a1=price*q;
        a2=a1+((a1*discount)/100);

        a3=a2-((a2*discount)/100);
        //cout<<price1;
        loss=loss+(a1-a3);
}
    cout<<loss;
}

}

Unpacking AMBOXES

$
0
0

A problem about infeasibly large amounts of seriously overpackaged candy.

Problem link

Problem statement:
Andy got a box of candies for Christmas. In fact, he discovered that the box contained several identical smaller boxes, and they could contain even smaller boxes, and so on. Formally, we say that candies are "boxes" of level $0$, and for $1 ≤ i ≤ n$, a level $i$ box contains $a_i$ boxes of level $i - 1$. The largest box has level $n$. Andy realized that it can take quite a long time to open all the boxes before he actually gets to eat some candies, so he put the box aside in frustration.

But today being his birthday, some friends came to visit Andy, and Andy decided to share some candies with them. In order to do that, he must open some of the boxes. Naturally, Andy can not open a box that is still inside an unopened box. If Andy wants to retrieve $X$ candies, what is the least number of boxes he must open? You must help him answer many such queries. Each query is independent.

My path to solution
My first thought was to solve for the given small test cases and use that to get ideas for the much bigger limits on test cases.

Clearly we know how many of the inmost boxes need to be opened - take $X/a_1$ and round up. This suggested two ways forward: - feed that number of boxes to the next level - work out how many candies are ultimately in each level box.

I tried both versions; the second version seemed easier to understand and precalculate for.

Then I came up with the idea of effective boxes vs. wrappers. A wrapper is what I called a box that only has one box inside it. If an effective box has $k$ wrappers then you don't need to recalculate for each level of wrapping - just multiply that effective box count by $k+1$.

This means we can collapse the box structure into effective boxes each with a multiplier, based on the number of wrappers above it. Then we can track our effective boxes up until we have enough box structure to hold the largest number of candies in a query. The limit on candy query size means that we only need to worry about at most $60$ effective boxes. And bingo, we have a reasonable amount of work per query and we can deliver the answer in the time available.

There's more detail but I'll leave that for you to work out.

My solution


Handy general hint
There were no (other) Python solutions (first!), but I was still able to generate reliable test data by copying an accepted answer into the IDE under its own language and generating some additional (more complex) test case results, which helped me get rid of an error caused by an operator precedence mistake.

Invitation to QuickMatch 10.5

$
0
0

https://www.codechef.com/KQM52018

Was supposed to have hires in gurgaon region, however removing hiring version. Contest will happen though. Last year I had done a job which held me from help hiring for 3 years. I wanted to do it, but my friends are warning me from doing it, I might be in trouble if I do so.

Invitation to Encoding August '18

$
0
0

Hello everyone!
We are excited to invite you all to Encoding August '18. The contest is hosted by Netaji Subhash Engineering College, Kolkata. The contest will have challenges for all - beginner to advanced programmers. We hope all of you will love to join us and spend the Sunday evening solving exciting coding challenges.

The authors of the contest are:
1. Arkapravo Ghosh
2. Amit Kumar Pandey
3. Rahul Ojha
4. Md Shahid

Contest Details

Date : 5th August
Time : 19:30 hrs - 22:30 hrs(IST)Check your timezone here
Contest Link : https://www.codechef.com/ENAU2018
Registration : You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Good Luck!
See you on the ranklist! Happy Coding!

getting wrong answer in KMXOR checked all the cases given in the editorial

Invitation to ProCon Junior 2018

$
0
0

"Code to fight, Code to survive, Code to win!"

Hello Everyone!

I would like to invite you all to participate in ProCon Junior to be held on CodeChef. It will begin at 19:30 IST on August 11, 2018.

The problems have been made by me (prakhar17252), Madhav Sainanee (madhav_1999) and Tanmay Bansal (tanmay28).

You will be given 7 problems to solve in 2.5 hours. The competition is open for all and rated for Div-2.

Top school students studying between classes VI-XII (or equivalent) in an Indian school will then be invited to the onsite finals to be held at Esya'18, the Technical Fest of IIIT-Delhi.

School Students, register here for onsite finals: bit.ly/PRCNJR18

Prizes worth Rs. 20000 for the top rankers in the onsite finals.

This is my first time hosting a contest, and that too a rated one! Hope you all like the problems!

Hope everyone has high ratings!

Good Luck!

Happy Coding!


what is the solution for time limit exceeded

$
0
0

My solution is showing time limit exceeded. What all can I do to solve this problem?

FLIPCOIN Editorial ?

Python input error

$
0
0

When i try to run a code in python on codechef it gives EOF error.

But the same thing if run with custom input it runs perfectly.

Add networkx in python

$
0
0

If possible, and if it is NOT unfair to other participants, Can codechef consider adding networkx library in python? It is very helpful library in manipulating graphs. Thanks.

Procon junior chef and pizza

$
0
0

How to solve “chef and pizza“ problem from procon junior?

Viewing all 40121 articles
Browse latest View live