Caramelio's blog

By Caramelio, history, 6 years ago, In English

Do you remember the time when you solved your first problem? Do you remember the feeling when your algorithm was accepted? It was a feeling you can't describe with words, right? Or was it normal? Please tell me.

P.S. This is my first time blogging, so I don't know what to write here. Could you tell me, please?

  • Vote: I like it
  • +34
  • Vote: I do not like it

| Write comment?
»
6 years ago, # |
  Vote: I like it +4 Vote: I do not like it

I solved the first USACO training pages problem and my mind was BLOWN.

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +13 Vote: I do not like it

    Me too!

    By the way, where can you find people's blogs?

    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it +7 Vote: I do not like it

      Click on the user's profile, then there is a button called "Blog entries" on the left side. You can see a user's blogs from there.

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    When my first problem was A+B))*facepalm

»
6 years ago, # |
  Vote: I like it +13 Vote: I do not like it

My first accepted problem was "TEST" from SPOJ. I thought competitive programming was easy and continued to the second spoj problem "PRIME1".

I learned I had a long way to go.

»
6 years ago, # |
  Vote: I like it +13 Vote: I do not like it

My first solved problem was at an event to get people to know competitive programming more. I kept digging through my groups so I can open the submission:

#include <bits/stdc++.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {
	int n,i,x;
	cin>>n;
	for(i=0;i<n;i++){
		cin>>x;
		printf("%d\n",746*x);
	}
	return 0;
}

Sure do miss problems like that

»
6 years ago, # |
  Vote: I like it +7 Vote: I do not like it

My first problem was this one. I was not qualified to Code jam that year, so I just looked at the problem (obviously just C as the first two are too easy), figured out the algorithm and said "Well coding it would certainly be within my capabilities" and closed the site.

A half a year later I actually solved my first problem on a Slovak local judge and realised it's not that easy.

»
6 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Well, I didn't even know of Codeforces when I first did a CP problem, It was for an Informatics Olympiad online round held in my country. I didn't code using C++ at the time, I used C# since it was the programming language I learned for using Unity. It was a fairly simple round, including a problem that needed you to sum A + B. The complex part was, at least for me at the time, reading this type of input in C#.

a b

You can't read inputs like that in C#, they had to be in different lines. I had to code a special way to get the input in two variables, what in C++ was like less than 5 lines of code, in C# was around 30 — 40 lines.

In the end I managed to solve it, and then my journey began, I even went to the IOI of past year (And based on my color you can tell how it went for me), I might not be that good, but at least I'm trying to improve, and that's what counts.

I did some digging, here is my first problem's code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A___B
{
    class Program
    {

        static void Main(string[] args)
        {
            int x = 0;
            int y = 0;
            ObtenerDatos(ref x, ref y);
            Console.WriteLine(x + y);
        }
        static void ObtenerDatos(ref int x, ref int y)
        {
            int[] Entradas = new int[2];
            string e = Console.ReadLine();
            int d = 0;
            string p = "";
            for (int c = 0; c < e.Length; c++)
            {
                if (e[c] == ' ')
                {
                    Entradas[d] = int.Parse(p);
                    p = "";
                    d++;
                }
                else
                {
                    p += e[c];
                }
                if (c + 1 == e.Length)
                {
                    Entradas[d] = int.Parse(p);
                    p = "";
                    d++;
                }
            }
            x = Entradas[0];
            y = Entradas[1];
        }
    }
}
»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

(submit A)

"pretests passed"

What's the meaning of "pretests"?I don't know!!!Did it Accepted???It's green,so maybe it accepted.

Then go to B. XD

»
6 years ago, # |
  Vote: I like it -7 Vote: I do not like it

My first solved problem was the 3n+1 on UVA online judge. I was so so happy as I had submitted this code 10 times without knowing why it got rejected:

#include<stdio.h>
#include<conio.h>
int main(void) {
    // do a lot of stuff
    printf("%d\n", res);
    getch();
    return 0;
}
»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

My first problem was solve me first on hackerrank. It was adding two numbers. Its pre written code already contained the solution in comments.

#include <stdio.h>
int solveMeFirst(int a, int b) {
    // Hint: Type return a+b; below
    return a+b; 
}
int main() {
    int num1,num2;
    scanf("%d %d",&num1,&num2);
    int sum; 
    sum = solveMeFirst(num1,num2);
    printf("%d",sum);
    return 0;
}

»
6 years ago, # |
  Vote: I like it +8 Vote: I do not like it

First solved problem was temperature converting using $$$\dfrac{C}{5} = \dfrac{F-32}{9}$$$. Place : College Lab IDE : Turbo C++ IDE Learnt from : Information and communication Technology Practical Book.