No tags yet

No tag edit access

Time limit per test: 1.75 second(s)

Memory limit: 262144 kilobytes

Memory limit: 262144 kilobytes

input: standard

output: standard

output: standard

You are given a sequence of 3·

- each of the integers from 1 to 3·
*N*belongs to exactly one of the sequences*A*,*B*or*C*; - the value of is the largest possible.

Constraints on N | Constraints on T |
---|---|

1 ≤ N ≤ 10 | 1 ≤ T ≤ 1000 |

11 ≤ N ≤ 15 | 1 ≤ T ≤ 100 |

16 ≤ N ≤ 20 | 1 ≤ T ≤ 10 |

21 ≤ N ≤ 25 | T = 1 |

The input file contains

sample input | sample output |

1 2 4 1 8 2 0 5 | 46 |

Note. The maximal value is attained by taking

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/23/2019 04:38:20 (f1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|