Instantly share code, notes, and snippets.

🎯
Focusing

# Thameem Karakkoththameemk612

🎯
Focusing
• Sort options
Created Aug 21, 2019
View database.php
 '', 'hostname' => 'localhost', 'username' => 'root',
Created Aug 21, 2019
View config.php

Created Jun 6, 2019
Created Mar 3, 2019
Created Oct 18, 2018
View 8
 Some years ago, there lived a farmer named Duncan in a far away land. Duncan had a cow named Wowie and he was deeply attached to her. Duncan would spend the whole summer stocking hay to feed Wowie in winter. Duncan collected hay and put it into haystack. As Duncan was a bright farmer, he collected the hay into cubical hay blocks of the same size and stored the blocks in his barn. After a summer spent in hard toil, Duncan stored A·B·C hay blocks and stored them in a barn as a rectangular parallelepiped A layers high. Each layer had B rows and each row had C blocks. At the end of the autumn Duncan came into the barn to admire one more time the hay he'd been stacking during this hard summer. Unfortunately, Duncan was shocked to see that the hay blocks had been carelessly scattered around the barn. The place was a complete mess. As it turned out, thieves had sneaked into the barn. They completely dissembled and took away a layer of blocks from the parallelepiped's front, back, top and sides. As a result, the bar
Created Oct 18, 2018
View 7
 Manu needs money and decides to open his uncle’s locker. He knows that the passcode of the locker consists of n numbers, and every number is a 0 or 1. Manu has made m attempts to enter the code. After each attempt the system told him in how many position stand the right numbers. It is not said in which positions the wrong numbers stand. Manu has been so unlucky that he hasn’t entered the code where would be more than 5 correct numbers. Now Manu is completely bewildered: he thinks there’s a mistake in the system and it is self-contradictory. Calculate how many possible code variants are left that do not contradict the previous system responses. Input The first input line contains two integers n and m which represent the number of numbers in the code and the number of attempts made by Manu. Then follow m lines, each containing space-separated si and ci which correspondingly indicate Manu’s attempt (a line containing n numbers which are 0 or 1) and the system’s response (an integer from 0 to 5 inclusively). Ou
Created Oct 18, 2018
View 6
 In a very large firm in South London, there is a cloakroom with a coat hanger. It has n hooks positioned in a row. The hooks are numbered with positive integers from 1 to n from left to right. The firm workers have a very complex work schedule. At the beginning of a work day, all the workers are not there and the coat hanger in the cloakroom is empty. At some moments of time the workers arrive and some of them leave. When some employee arrives, he hangs his cloak on one of the available hooks. To be of as little discomfort to his colleagues as possible, the hook where the coat will hang, is chosen like this. First the employee chooses the longest segment among available hooks following in a row. If there are several of such segments, then he chooses the one closest to the right. After that the coat is hung on the hook located in the middle of this segment. If the segment has an even number of hooks, then among two central hooks we choose the one closest to the right. When an employee leaves, he takes his c
Created Oct 18, 2018
View 5
 You have got a new job, and it's very interesting, you are a ship captain. Your first task is to move your ship from one point to another point, and for sure you want to move it at the minimum cost. And it's well known that the shortest distance between any 2 points is the length of the line segment between these 2 points. But unfortunately there is an island in the sea, so sometimes you won't be able to move your ship in the line segment between the 2 points. You can only move to safe points. A point is called safe if it's on the line segment between the start and end points, or if it's on the island's edge. But you are too lucky, you have got some clever and strong workers and they can help you in your trip, they can help you move the ship in the sea and they will take 1 Egyptian pound for each moving unit in the sea, and they can carry the ship (yes, they are very strong) and walk on the island and they will take 2 Egyptian pounds for each moving unit in the island. The money which you will give to them
Created Oct 18, 2018
View 4
 Find the greatest common divisor d between two integers a and b that is in a given range from low to high (inclusive), i.e. low ≤ d ≤ high. It also is possible that there is no common divisor in the given range. You will be given the two integers a and b, then n queries. Each query is a range from low to high and you have to answer each query. Input The first line contains two integers a and b, the two integers as described above (1 ≤ a, b ≤ 109). The second line contains one integer n, the number of queries (1 ≤ n ≤ 104). Then n lines follow, each line contains one query consisting of two integers, low and high (1 ≤ low ≤ high ≤ 109). Output Print n lines. The i-th of them should contain the result of the i-th query in the input. If there is no common divisor in the given range for any query, you should print -1 as a result for this query. Input Format
Created Oct 18, 2018
View 3
 When E-mail addresses are spelled out, one pronounces a . as dot, an @ sign as at. As a result, we get something like blasphemy98atyahoodotcom . We need to obtain the real mail ID from this like - blasphemy98@yahoo.com . It is known that a proper email address contains only such symbols as . @ and lower-case Latin letters, doesn't start with and doesn't end with a dot. Also, a proper email address doesn't start with and doesn't end with an at sign. Moreover, an email address contains exactly one such symbol as @, yet may contain any number (possible, zero) of dots. A series of replacements has to be made so that the length of the result is as short as possible and it is a valid email address. If the lengths are equal, the lexicographically minimal result should be printed. Example : Input codertowinatgmaildotcom Ouput
You can’t perform that action at this time.