SRMは今回が初参加。
初参加なのでDiv2のようです。
結論から言うと
Div2の中で4位
レーティング:(無し)→1759
・・・本当ですよね?
なんかすごいことになったみたいです。
これが実際に提出したソースコードです。
[hr]
Easy(250点)
#line 63 "WhichDay.cpp"
#include
#include
using namespace std;
class WhichDay {
public:
string getDay(vector notOnThisDay) {
const string days[7]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
int notthis[7]={0};
int i,j;
for(i=0;i
#include
#include
#include
using namespace std;
class ThreeTeleports {
private:
int dist(int sx,int sy,int dx,int dy) {
return abs(sx-dx)+abs(sy-dy);
}
public:
int shortestDistance(int xMe, int yMe, int xHome, int yHome, vector teleports) {
int use[6][3]={
{0,1,2},
{0,2,1},
{1,0,2},
{1,2,0},
{2,0,1},
{2,1,0}
};
long long shortest=0x7fffffffffffffffLL;
long long nowtime;
int tppos[3][4];
int which,howmany,dotti;
int i;
int nowx,nowy;
//get tppos
for(i=0;i
#include
using namespace std;
class BinaryCards {
public:
long long largestNumber(long long A, long long B) {
int i;
long long answer;
for(i=63;i>=0;i--) {
if(!(A & (1LL=0;i--) {
answer|=(1LL<<i);
}
return answer;
}
};
オーバーフローに注意。
[hr]
次はいつ出られるかわかりませんが、次に出る時は多分Div1ですね。
また頑張りたいと思います。