Monday, 18 August 2014

SPOJ PROBLEM 2:PRIME GENERATOR (PRIME1)

The problem though has virtually the simple image logic to be figured out but it may cause to
most cruel spoj error "TIME LIMIT EXCEEDED".
The question has many different logic but the problem has been set to make use of an algorithm
known as "SIEVE OF ERASTOSTHENES".
This algo just sieves down the prime nos. .
You would surely love the algo.
Youtube link:  https://www.youtube.com/watch?v=eKp56OLhoQs
Wikipedia link:  http://en.wikipedia.org/wiki/Sieve_of_Erastosthenes

Quick link to Dev C++ Download Mirror

http://sourceforge.net/projects/dev-cpp/files/Binaries/Dev-C%2B%2B%204.9.9.2/devcpp-4.9.9.2_setup.exe/download?use_mirror=kaz

WHAT TO CHOOSE IN ENRGY MANAGEMENT SYSTEM:OPTIMIZED BATTERY / MAXIMIZE BATTERY HEALTH

Maximize Battery Health generally means Energy Management will try to squeeze out as many minutes as possible when the laptop is running on the battery.

Optimized Battery Health means Energy Management limits the battery charge to 60% so that the battery life is not prematurely shortened. Basically between a battery is charged to 100% for a prolonged period of time it can actually shorten the life of the battery. That means if the battery can last 5 hours in normal usage when it is new, that battery life will decrease somewhat quickly over time if the battery is always kept at 100% charge. It has to do with the chemistry of how lithium battery works.
the answer taken from different sites.

So it is preffered to use it in Optimized Battery Health if u always keep it plugged in , you arent short of electric power!!!!!!!!!!!!!!!!

Sunday, 10 August 2014

WHEN YOU HAD WORKED ON TURBO PLATFORM............

It sometimes happen to many people as they are working on turbo c++ platforn and are new to present trending platform like dev cc++ ,visual studio,etc.
so need to worry
Basic code goes like this:
#include <iostream>
using namespace std;

int main() {
    // your code goes here
    return 0;
}
to include any other use 'c' before it
for ex.:  <stdio.h>    ---->   <cstdio>
rest all goes same as before!!!!!!!!!!!

SPOJ PROBLEM (CLASSICAL) 5976: TRGRID

the questioon is simply brute force approach
USE PEN PAPER
you would be getting simple logic that if n<m(   m has some conditions )  
if( m<=n)   ( n has some conditions)
question takes time to understand the logic but once you are over with logic task
a simple code is to be encoded........................

SPOJ PROBLEM (CLASSICAL) 11063: AP2

Simple concepts of 11th standard are used of progression
third and last third add up to give something in sum of AP equation
use that hint & problem solved!!!!!!!!!!