This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
interface ISparseSortedArray { | |
void Set(uint position, ulong value); | |
ulong Sum(ulong upperBound); | |
} | |
class TreapItem { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Applicative | |
import Control.Monad | |
import Data.Array | |
readInt :: IO Int | |
readInt = readLn | |
readIntPair :: IO [Int] | |
readIntPair = parseLine <$> getLine | |
where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <vector> | |
int main() { | |
int n = 0; | |
scanf("%d", &n); | |
std::vector<int> v(n + 1); | |
int k = 0; | |
for (int i = 0; i < n; i++) { | |
scanf("%d", &k); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
) | |
func main() { | |
in := bufio.NewReader(os.Stdin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 1330_slow.hs 2013-01-27 07:01:28.000000000 +0600 | |
+++ 1330.hs 2013-01-27 07:00:01.000000000 +0600 | |
@@ -1,17 +1,22 @@ | |
import Control.Applicative | |
import Control.Monad | |
import Data.Array | |
+import Data.Maybe | |
import Data.Time.Clock | |
import System.IO | |
import Text.Printf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Applicative | |
import Control.Monad | |
import qualified Data.Map as M | |
import qualified Data.Set as S | |
import Data.Maybe | |
import Data.List | |
import Text.Printf | |
nextRng b c r prev = (b * prev + c) `mod` r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Point { | |
let x = 0 | |
} | |
func printPoints(points: [Point?]) { | |
for maybePoint in points { | |
if let point = maybePoint { | |
print(point.x) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Applicative | |
import qualified Data.Text as T | |
import qualified Data.Text.IO as T | |
type Vector = (Int, Int) | |
type Point = Vector | |
type VectorZipper = ([Vector], [Vector]) | |
data Instruction = Instruction { | |
rotation :: Char, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Foo {} | |
trait Bar {} | |
macro_rules! implement_traits { | |
($type_name:ty) => { | |
impl Foo for $type_name {} | |
impl Bar for $type_name {} | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 0%] Built target LLVMDemangle | |
[ 0%] Built target LLVMTableGen | |
[ 33%] Built target obj.llvm-tblgen | |
[100%] Built target LLVMSupport | |
[100%] Built target llvm-tblgen | |
[100%] Building Attributes.inc... | |
[100%] Building IntrinsicEnums.inc... | |
[100%] Building IntrinsicImpl.inc... | |
[100%] Built target intrinsics_gen | |
[100%] Building AlphaGenRegisterInfo.inc... |
OlderNewer