Submission #2163235


Source Code Expand

#include "bits/stdc++.h"

#define ALL(g) (g).begin(),(g).end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i, x, n) for(int i = x; i >= n; i--)
#define rrep(i, n) RREP(i,n,0)
#define pb push_back
#define show_table(n, k, table) rep(i,n){ rep(j,k) cout << table[i][j] << " "; cout << endl;}

using namespace std;

template<class T> inline void chmax(T& a,T const& b){a=max(a,b);}
template<class T> inline void chmin(T& a,T const& b){a=min(a,b);}

using ll = long long;
using P = pair<int,int>;
using Pl = pair<ll,ll>;
using vi = vector<int>;
using vvi = vector<vi>;

const int mod=1e9+7,INF=1<<30;
const double EPS=1e-12,PI=3.1415926535897932384626;
const ll lmod = 1e9+7,LINF=1LL<<60;
const int MAX_N = 2003;

int main(){
  double X, Y; cin >> X >> Y;
  int cnt = 0;
  for (int x = floor(X) - 10; x <= X + 10; ++x) {
    for (int y = floor(Y) - 10; y <= Y + 10; ++y) {
      double dx = X - x;
      double dy = Y - y;
      double nx = dx * 1000 + x;
      double ny = dy * 1000 + y;
      if(abs(nx)<=10000&&abs(ny)<=10000){
        cout << x << " " << y << " " << nx << " " << ny << endl;
        cnt++;
        if (cnt == 2) return 0;
      }
    }
  }
}

Submission Info

Submission Time
Task B - 交点
User kurarrr
Language C++14 (GCC 5.4.1)
Score 100
Code Size 1245 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 27
Set Name Test Cases
All scrambled_00.txt, scrambled_01.txt, scrambled_02.txt, scrambled_03.txt, scrambled_04.txt, scrambled_05.txt, scrambled_06.txt, scrambled_07.txt, scrambled_08.txt, scrambled_09.txt, scrambled_10.txt, scrambled_11.txt, scrambled_12.txt, scrambled_13.txt, scrambled_14.txt, scrambled_15.txt, scrambled_16.txt, scrambled_17.txt, scrambled_18.txt, scrambled_19.txt, scrambled_20.txt, scrambled_21.txt, scrambled_22.txt, scrambled_23.txt, scrambled_24.txt, scrambled_25.txt, scrambled_26.txt
Case Name Status Exec Time Memory
scrambled_00.txt AC 1 ms 256 KB
scrambled_01.txt AC 1 ms 256 KB
scrambled_02.txt AC 1 ms 256 KB
scrambled_03.txt AC 1 ms 256 KB
scrambled_04.txt AC 1 ms 256 KB
scrambled_05.txt AC 1 ms 256 KB
scrambled_06.txt AC 1 ms 256 KB
scrambled_07.txt AC 1 ms 256 KB
scrambled_08.txt AC 1 ms 256 KB
scrambled_09.txt AC 1 ms 256 KB
scrambled_10.txt AC 1 ms 256 KB
scrambled_11.txt AC 1 ms 256 KB
scrambled_12.txt AC 1 ms 256 KB
scrambled_13.txt AC 1 ms 256 KB
scrambled_14.txt AC 1 ms 256 KB
scrambled_15.txt AC 1 ms 256 KB
scrambled_16.txt AC 1 ms 256 KB
scrambled_17.txt AC 1 ms 256 KB
scrambled_18.txt AC 1 ms 256 KB
scrambled_19.txt AC 1 ms 256 KB
scrambled_20.txt AC 1 ms 256 KB
scrambled_21.txt AC 1 ms 256 KB
scrambled_22.txt AC 1 ms 256 KB
scrambled_23.txt AC 1 ms 256 KB
scrambled_24.txt AC 1 ms 256 KB
scrambled_25.txt AC 1 ms 256 KB
scrambled_26.txt AC 1 ms 256 KB