Submission #1173458


Source Code Expand

#include <bits/stdc++.h>

struct Timer {
  Timer() {
    total = 0;
    begintime = rdtsc();
  }
  uint64_t rdtsc() {
    uint64_t u, l;
    __asm__ volatile ("rdtsc" : "=a" (l), "=d" (u)); return ((u << 32) | l);
  }
  void stop() {
    total += (rdtsc() - begintime);
    begintime = 0;
  }
  void start() {
    begintime = rdtsc();
  }
#ifdef LOCAL_
  uint64_t CPS = 2600000000;
  double timelimit = 4;
#else
  uint64_t CPS = 2800000000;
  double timelimit = 4;
#endif
  uint64_t begintime;
  uint64_t total;
  inline double getTime() {
    uint64_t now = rdtsc();
    if( begintime == 0 ) {
      return (double)(total) / CPS;
    }
    return (double)(now - begintime + total) / CPS;
  }
} timer;

#ifndef LOCAL_
#define fprintf if( false ) fprintf
#endif // LOCAL_
#define dumpl(x1) fprintf(stderr, "#%s.%d (%s) = (%ld)\n", __func__, __LINE__, #x1, x1);
#define dumpll(x1, x2) fprintf(stderr, "#%s.%d (%s, %s) = (%ld, %ld)\n", __func__, __LINE__, #x1, #x2, x1, x2);
#define dumpd(x1) fprintf(stderr, "#%s.%d (%s) = (%lf)\n", __func__, __LINE__, #x1, x1);
#define dumpdd(x1, x2) fprintf(stderr, "#%s.%d (%s, %s) = (%lf, %lf)\n", __func__, __LINE__, #x1, #x2, x1, x2);
#define loop for(;;)
 
struct S002 {
  int n;
  S002& operator > (long& x) {
    n = x;
    return *this;
  }
  S002& operator > (long&& x) {
    n = x;
    return *this;
  }
  S002& operator >= (long& x) {
    if( scanf("%ld", &x) <= 0 ) exit(0);
    return *this;
  }
  S002& operator >= (double& x) {
    if( scanf("%lf", &x) <= 0 ) exit(0);
    return *this;
  }
  S002& operator >= (std::string& s) {
    if( not (std::cin >> s) ) exit(0);
    return *this;
  }
  template<typename a>
  S002& operator >= (std::vector<a>& v) {
    v.resize(n);
    for(long i = 0; i < n; ++i) {
      *this >= v[i];
    }
    return *this;
  }
  template<typename a, std::size_t s>
  S002& operator >= (std::array<a, s>& x) {
    for(long i = 0; i < (long)s; ++i) {
      *this >= x[i];
    }
    return *this;
  }
};

struct Point {
  long r, c;
  Point() : r(-1), c(-1) {}
  Point(long r_, long c_) : r(r_), c(c_) {}
  long encode() {
    return r * 32 + c;
  }
  bool inrange() {
    return 1 <= r and r <= 30 and 1 <= c and c <= 30;
  }
};
Point operator + (const Point& x, const Point& y) {
  return Point(x.r + y.r, x.c + y.c);
}
bool operator == (const Point& x, const Point& y) {
  return x.r == y.r and x.c == y.c;
}
Point d4[] = {
  Point(0, 1),
  Point(0, -1),
  Point(1, 0),
  Point(-1, 0)
};
const char cs[] = "RLDU";

struct Solver {
  long h, w, k, t;
  std::array<Point, 450> ss;
  std::array<Point, 450> ds;
  std::array<long, 1024> field;
  Solver() {
    S002 reader;
    reader >= h >= w >= k >= t;
    std::array<long, 4> ts;
    for(long& f : field) {
      f = -1;
    }
    for(long i = 0; i < k; ++i) {
      reader >= ts;
      ss[i] = Point(ts[0], ts[1]);
      ds[i] = Point(ts[2], ts[3]);
      field[ss[i].encode()] = i;
    }
  }
  bool shift1() {
    std::array<char, 450> c;
    bool ok = false;
    for(long i = 0; i < k; ++i) {
      if( ss[i].r <= 15 ) {
      }
    }
    
  }
  void solve() {
    printf("0\n");
    // while( t != 0 and shift1() ) ;
    
    // makeChain();
    // printf("%ld\n", (long)k);
    // for(long i = 0; i < k; ++i) {
    //   writeInst(chain);
    // }
  }
};
 
int main() {
  std::unique_ptr<Solver>(new Solver())->solve();
  return 0;
}

Submission Info

Submission Time
Task B - 日本橋大渋滞
User spica314
Language C++14 (GCC 5.4.1)
Score 3331
Code Size 3517 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name test_01 test_02 test_03 test_04 test_05 test_06 test_07 test_08 test_09 test_10 test_11 test_12 test_13 test_14 test_15 test_16 test_17 test_18 test_19 test_20 test_21 test_22 test_23 test_24 test_25 test_26 test_27 test_28 test_29 test_30
Score / Max Score 114 / 50000 111 / 50000 114 / 50000 116 / 50000 120 / 50000 112 / 50000 112 / 50000 116 / 50000 105 / 50000 109 / 50000 117 / 50000 109 / 50000 109 / 50000 111 / 50000 107 / 50000 115 / 50000 109 / 50000 110 / 50000 111 / 50000 110 / 50000 115 / 50000 110 / 50000 110 / 50000 108 / 50000 106 / 50000 110 / 50000 111 / 50000 104 / 50000 110 / 50000 110 / 50000
Status
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
Set Name Test Cases
test_01 subtask_01_01.txt
test_02 subtask_01_02.txt
test_03 subtask_01_03.txt
test_04 subtask_01_04.txt
test_05 subtask_01_05.txt
test_06 subtask_01_06.txt
test_07 subtask_01_07.txt
test_08 subtask_01_08.txt
test_09 subtask_01_09.txt
test_10 subtask_01_10.txt
test_11 subtask_01_11.txt
test_12 subtask_01_12.txt
test_13 subtask_01_13.txt
test_14 subtask_01_14.txt
test_15 subtask_01_15.txt
test_16 subtask_01_16.txt
test_17 subtask_01_17.txt
test_18 subtask_01_18.txt
test_19 subtask_01_19.txt
test_20 subtask_01_20.txt
test_21 subtask_01_21.txt
test_22 subtask_01_22.txt
test_23 subtask_01_23.txt
test_24 subtask_01_24.txt
test_25 subtask_01_25.txt
test_26 subtask_01_26.txt
test_27 subtask_01_27.txt
test_28 subtask_01_28.txt
test_29 subtask_01_29.txt
test_30 subtask_01_30.txt
Case Name Status Exec Time Memory
subtask_01_01.txt AC 1 ms 256 KB
subtask_01_02.txt AC 1 ms 256 KB
subtask_01_03.txt AC 1 ms 256 KB
subtask_01_04.txt AC 1 ms 256 KB
subtask_01_05.txt AC 1 ms 256 KB
subtask_01_06.txt AC 1 ms 256 KB
subtask_01_07.txt AC 1 ms 256 KB
subtask_01_08.txt AC 1 ms 256 KB
subtask_01_09.txt AC 1 ms 256 KB
subtask_01_10.txt AC 1 ms 256 KB
subtask_01_11.txt AC 1 ms 256 KB
subtask_01_12.txt AC 1 ms 256 KB
subtask_01_13.txt AC 1 ms 256 KB
subtask_01_14.txt AC 1 ms 256 KB
subtask_01_15.txt AC 1 ms 256 KB
subtask_01_16.txt AC 1 ms 256 KB
subtask_01_17.txt AC 1 ms 256 KB
subtask_01_18.txt AC 1 ms 256 KB
subtask_01_19.txt AC 1 ms 256 KB
subtask_01_20.txt AC 1 ms 256 KB
subtask_01_21.txt AC 1 ms 256 KB
subtask_01_22.txt AC 1 ms 256 KB
subtask_01_23.txt AC 1 ms 256 KB
subtask_01_24.txt AC 1 ms 256 KB
subtask_01_25.txt AC 1 ms 256 KB
subtask_01_26.txt AC 1 ms 256 KB
subtask_01_27.txt AC 1 ms 256 KB
subtask_01_28.txt AC 1 ms 256 KB
subtask_01_29.txt AC 1 ms 256 KB
subtask_01_30.txt AC 1 ms 256 KB