Submit | All submissions | Best solutions | Back to list |
ABCDEF - ABCDEF |
You are given a set S of integers between -30000 and 30000 (inclusive).
Find the total number of sextuples that satisfy:
Input
The first line contains integer N (1 ≤ N ≤ 100), the size of a set S.
Elements of S are given in the next N lines, one integer per line. Given numbers will be distinct.
Output
Output the total number of plausible sextuples.
Examples
Input: 1 1 Output: 1 |
Input: 2 2 3 Output: 4 |
Input: 2 -1 1 Output: 24 |
Input: 3 5 7 10 Output: 10 |
Added by: | Luka Kalinovcic |
Date: | 2009-07-13 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ERL JS-RHINO NODEJS PERL6 VB.NET |
Resource: | own problem |
hide comments
|
||||||||||||||
2015-01-05 14:36:08 sirius
Im getting time limit exceeded for case 11,anyone knows why? |
||||||||||||||
2014-12-13 18:56:04 Vinay
used quick sort and binary search still got TLE for 11th case :/ |
||||||||||||||
2014-11-22 17:06:17 HARINDER SINGH
used map got TLE |
||||||||||||||
2014-11-09 07:04:39 Lokesh
What is the best possible time complexity?(Say we have to find in the range 1-n) |
||||||||||||||
2014-11-07 19:57:36 Ashish Tilokani
wtf?? long long gives TLE ?? |
||||||||||||||
2014-11-06 21:24:13 Make In India !
Note : 'd' can't be Zero . Gave me WA in 14th test case. |
||||||||||||||
2014-11-03 11:06:38 californiagurl
if you dont understand how to approach this problem, just read all the comments :p ;) :D Last edit: 2014-11-03 11:44:10 |
||||||||||||||
2014-10-26 16:31:46 Arun Karthikeyan
phew!!, took an entire day to get a good timed java solution p.s - 'int' is enough, no need for long in java. |
||||||||||||||
2014-10-23 09:53:58 Anubhav Balodhi
got TLE using STL, why :-P |
||||||||||||||
2014-09-24 13:47:23 jack sparrow
easy!!! if u do it properly ,even with stl |