Modified ac.cpp
merge